Skip to main content

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.

OptionDescription
--warmwarm the URLs which you can see in System -> Page Cache Warmer -> Pages depending on Performance settings and Warm rules configurations.
--remove-all-pagesremove 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.

OptionDescription
--unlockunlock the synchronization process if it was finished incorrectly.
--customer-group-id 1crawl all pages for customers with the specified group ID number.
--cycle_limit 5set the crawl cycle limit (default: 100). The first cycle collects links from the Home page, and the second cycles through them.
--store-id 2crawl all pages for store with ID 2.
--base-url http://example.comcrawl all pages for the store with the base url http://example.com
--ignore-querycrawl 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:

OptionDescription
--source-id 2synchronize the source with ID 2.
--resetreset synchronization date of the Source(s). It will not start the synchronization automatically after resetting the synchronization date.
--unlockunlock 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.