Command Line Interface
Below are the available commands for the Page Cache Warmer module.
Base command
bin/magento mirasvit:cache-warmer
Base command of the extension. This command requires one of the following options.
Option | Description |
---|---|
--warm | warm the URLs which you can see in System -> Page Cache Warmer -> Pages depending on Performance settings and Warm rules configurations. |
--remove-all-pages | remove all collected URLs from the Pages section. It is recommended to clear the cache after use so the extension can re-collect URLs. |
Crawling URLs
bin/magento mirasvit:cache-warmer:crawl
Crawl store URLs and add them to the Pages table. This command can be executed as is, however it has additional options to fine-tune the execution.
Option | Description |
---|---|
--unlock | unlock the synchronization process if it was finished incorrectly. |
--customer-group-id 1 | crawl all pages for customers with the specified group ID number. |
--cycle_limit 5 | set the crawl cycle limit (default: 100). The first cycle collects links from the Home page, and the second cycles through them. |
--store-id 2 | crawl all pages for store with ID 2. |
--base-url http://example.com | crawl all pages for the store with the base url http://example.com |
--ignore-query | crawl all pages except pages with query parameters (?). |
tip
Command options can be combined:
bin/magento mirasvit:cache-warmer:crawl --ignore-query --unlock
Synchronize URLs from source
bin/magento mirasvit:cache-warmer:sync-source
Synchronize URLs from configured Sources. This command has the following options:
Option | Description |
---|---|
--source-id 2 | synchronize the source with ID 2. |
--reset | reset synchronization date of the Source(s). It will not start the synchronization automatically after resetting the synchronization date. |
--unlock | unlock if it was finished incorrectly. |
tip
Command options can be combined:
bin/magento mirasvit:cache-warmer:sync-source --source-id 2 --unlock --reset
Simulating cron tasks
bin/magento mirasvit:cache-warmer:cron
Running all extension cron tasks once to verify the module's functionality.
Testing
bin/magento mirasvit:cache-warmer:test
This command is for the testing purposes.