lizardmedia / module-varnish-warmer

lizardmedia/module-varnish-warmer

Varnish Cache Warmer Magento2 module by Lizard Media

magento2-module Compatibility: Not yet tested Code Quality: Fail Tests: N/A Security: Pass MIT

Are you the maintainer of lizardmedia?

Packagento pulls lizardmedia's Composer packages from the public registry so buyers can find them here.

Claim the namespace to take ownership, publish new releases directly, and start charging for premium versions.

Claim this namespace →

Latest Stable Version
Total Downloads
License
Scrutinizer Code Quality
Build Status

Magento2 Varnish Cache Warmer

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.

Getting Started

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.

Prerequisites

For release 1.0
  • Magento 2.2
  • PHP 7.1
For realease 2.0
  • Magento 2.3
  • PHP 7.1/7.2
For realease 2.2
  • Magento 2.3
  • PHP 7.1/7.2/7.3
For realease 2.3
  • Magento 2.3/2.4
  • PHP 7.1/7.2/7.3/7.4

Installing

Download the module

Using composer (suggested)

Simply run

composer require lizardmedia/module-varnish-warmer
Downloading ZIP

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

Install the module

Run this command

bin/magento module:enable LizardMedia_VarnishWarmer
bin/magento setup:upgrade

Usage

Admin panel

The commands can be run in backround from admin panel using Lizard Media Varnish Warmer
menu tab.

CLI

The commands can be run using Magento built-in CLI:

  • lm-varnish:cache-purge-homepage - purges and regenerates homepage
  • lm-varnish:cache-purge-general - purges and regenerates homepage and categories
  • lm-varnish:cache-purge-wildcard - purges * and regenerates homepage, categories and products
  • lm-varnish:cache-purge-all - purges and regenerates homepage, categories and products
  • lm-varnish:cache-purge-force - purges * without regenerating. Omits lock check
  • lm-varnish:cache-purge-products - purges and regenerates products
  • lm-varnish:cache-refresh-url - purges and regenerates single URL given as argument

Command options

  • store - sets store view ID to get a correct base URL, e.g.
php bin/magento lm-varnish:cache-refresh-url "*" --store=1

For developers

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.

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

2.1.

  • fix for incorrect method for purging process
  • adding logging for error request
  • minor refactor

2.2

  • major refactor
  • adding missing return types/types hints
  • support for PHP 7.3
  • fix for case when urls uses store codes inside after domain

2.2.1

  • fix for cache purging headers

2.3

  • support for PHP 7.4

2.3.1

  • fix for magento installation bug (lack of using proxy in console command class)
Versions
Version Stability QA Status Compatibility Released
2.3.3 stable Fail Not yet tested Details 2026-03-27 15:29:01
2.3.2 stable Not tested Not yet tested Details 2024-02-07 13:54:19
2.3.1 stable Not tested Not yet tested Details 2021-02-05 11:40:09
2.3 stable Not tested Not yet tested Details 2021-01-06 22:20:04
2.2.1 stable Not tested Not yet tested Details 2020-06-16 17:05:28
2.2.0 stable Not tested Not yet tested Details 2020-01-27 08:10:16
2.1.0 stable Not tested Not yet tested Details 2020-01-19 21:09:03
2.0.2 stable Not tested Not yet tested Details 2019-09-01 10:29:44
2.0.1 stable Not tested Not yet tested Details 2019-02-12 06:28:09
2.0.0 stable Not tested Not yet tested Details 2019-02-12 06:25:45
1.0.7 stable Not tested Not yet tested Details 2018-09-17 06:03:00
1.0.6 stable Not tested Not yet tested Details 2018-08-28 08:14:09
1.0.5 stable Not tested Not yet tested Details 2018-08-28 07:45:47
1.0.4 stable Not tested Not yet tested Details 2018-05-24 17:33:18
1.0.3 stable Not tested Not yet tested Details 2018-05-23 19:02:33
1.0.2 stable Not tested Not yet tested Details 2018-05-23 18:32:41
1.0.1 stable Not tested Not yet tested Details 2018-05-22 08:21:13

Requires 7

Package Constraint
magento/framework >=102.0
magento/module-backend *
magento/module-catalog *
magento/module-config *
magento/module-store *
php >=7.1.0
react/http-client ^0.5.9

Compatibility

Each Magento release line is installed on its supported PHP versions, then the module is built (DI compilation + static-content deploy) and its unit and integration suites are run. The matrix shows the lines and PHP versions the module is confirmed to install and run on. Code-quality results further down (phpstan, phpcs, …) are reported separately and never affect compatibility.

Compatibility matrix (Magento × PHP)
Magento PHP 8.2 PHP 8.3 PHP 8.4 PHP 8.5
2.4.7 not tested not tested
2.4.8 not tested not tested
2.4.9 not tested not tested

Code Quality

Advisory checks against the module's source. Static analysis runs once across the whole module; PHPStan re-runs per Magento + PHP version because resolvable symbols differ between releases. These NEVER affect the Compatibility badge. A phpcs finding can't make a module incompatible.

Static analysis

Coding standards (phpcs), mess detection (phpmd), copy-pasted code (cpd), PHP cross-version compatibility, composer.json validity. Each runs once for the whole module.

Static analysis results
Tool Status Findings Summary
PHPCS Fail 82 3 errors, 79 warnings (ruleset: Magento2) — 77 auto-fixable with phpcbf
PHPMD Warning 2 2 rule violations (EmptyCatchBlock:1, ExcessiveClassComplexity:1)
Cpd Pass 0
Composer validate Info 6 valid; 6 advisory notes (composer validate --strict)

PHPStan

Type-checks the module's PHP against a real Magento install at the configured gate level. Re-runs per Magento and PHP version because resolvable symbols differ between releases.

PHPStan results by Magento and PHP version
Magento PHP 8.2 PHP 8.3 PHP 8.4 PHP 8.5
2.4.7 Error Error
2.4.8 Error Error
2.4.9 Error Error

Tests

Unit and integration suites, run for each applicable Magento and PHP version. A test failure speaks to the module's behaviour, not its compatibility with a Magento line, so it is reported here separately and never reddens the compatibility matrix.

Unit tests

Unit tests results by Magento and PHP version
Magento PHP 8.2 PHP 8.3 PHP 8.4 PHP 8.5
2.4.7 N/A N/A
2.4.8 N/A N/A
2.4.9 N/A N/A

Integration tests

Integration tests results by Magento and PHP version
Magento PHP 8.2 PHP 8.3 PHP 8.4 PHP 8.5
2.4.7 N/A N/A
2.4.8 N/A N/A
2.4.9 N/A N/A

Security

Security checks run directly against the module: an audit of its declared dependencies for known vulnerabilities (composer audit) and a scan of its source for malware and web-shell signatures. Each runs once. A malware detection fails the version outright.

Security results
Tool Status Findings Summary
Composer audit Pass 0
Malware scan Pass 0
License
MIT
Make it pay

Turn an existing module into recurring revenue.

If you already maintain a Magento 2 module on GitHub or GitLab, listing it on Packagento takes about five minutes. We mirror your tags, handle distribution signing, and route paid licenses through Stripe Connect, so you can keep shipping the way you already do.