Magento2 module for handling Varnish Cache cleaning and regenerating using admin panel and CLI. It uses multiple process to run the commands to minimize the time required to run.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
- Magento 2.2
- PHP 7.1
- Magento 2.3
- PHP 7.1/7.2
- Magento 2.3
- PHP 7.1/7.2/7.3
- Magento 2.3/2.4
- PHP 7.1/7.2/7.3/7.4
Simply run
composer require lizardmedia/module-varnish-warmer
Download a ZIP version of the module and unpack it into your project into
app/code/LizardMedia/VarnishWarmer
If you use ZIP file you will need to install the dependencies of the module manually
composer require react/http-client:^0.5.9
Run this command
bin/magento module:enable LizardMedia_VarnishWarmer
bin/magento setup:upgrade
The commands can be run in backround from admin panel using Lizard Media Varnish Warmer
menu tab.
The commands can be run using Magento built-in CLI:
lm-varnish:cache-purge-homepage
- purges and regenerates homepagelm-varnish:cache-purge-general
- purges and regenerates homepage and categorieslm-varnish:cache-purge-wildcard
- purges * and regenerates homepage, categories and productslm-varnish:cache-purge-all
- purges and regenerates homepage, categories and productslm-varnish:cache-purge-force
- purges * without regenerating. Omits lock checklm-varnish:cache-purge-products
- purges and regenerates productslm-varnish:cache-refresh-url
- purges and regenerates single URL given as argument
- store - sets store view ID to get a correct base URL, e.g.
php bin/magento lm-varnish:cache-refresh-url "*" --store=1
The number of process used for purging and regenerating Varnish cache can be customized
in the admin panel. The max number of processes is specified in
LizardMedia\VarnishWarmer\Model\Config\GeneralConfigProvider
If you have a powerful server you can modify those numbers to use more resources.
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
We use SemVer for versioning. For the versions available, see the tags on this repository.
- Maciej Sławik - Initial work - Lizard Media
- Bartosz Kubicki - Fixes & maintenance - Lizard Media
See also the list of contributors who participated in this project.
This project is licensed under the MIT License - see the LICENSE.md file for details