Magento cache cleared but content stale: verify Varnish purge

2 min read

Silver 3D illustration with gold details and accents: blue and mint — Kowal Purge Varnish Cache

Magento reports cleared cache, yet customers still see the previous CMS block? Identify the layer serving the response. Kowal Purge Varnish Cache connects a particular admin action with a local Varnish ban command. Infrastructure access matters, so a successful panel message alone does not prove invalidation.

Define the data and scope

Before changing anything, record the store view, language, theme and information source. Prepare one control example and its initial state. For other views, establish which settings should be inherited and which are deliberately overridden so the comparison uses the same context.

Prepare the configuration

Check Varnish and PHP process permissions. Verified code uses /usr/bin/varnishadm, /etc/varnish/secret and 127.0.0.1:6082 without a form for changing those values. PHP must run exec, read the required file and reach the interface. Containers, remote Varnish or different paths require adaptation rather than entering a host in nonexistent connection settings.

Start with test data and an explicitly selected record scope. Change one setting at a time. Keep the configuration, input identifiers and output so another administrator can reproduce the operation without guessing its parameters or relying on a screenshot alone.

Run a concrete scenario

Change a distinctive CMS text in testing and retain the old response. Run Flush Cache Storage, inspect the Magento log and request the page again. The observer listens to adminhtml_cache_flush_all. Test every unique hostname from store-view base URLs: banning uses req.http.host, so one successful domain does not prove the others were refreshed.

Compare actual records before and after the operation. Include one qualifying case and another intended to remain unchanged. On failure record the stage, identifier and message. Do not repeat a bulk operation merely because a visible completion confirmation is missing.

Check boundaries and accept the implementation

Saving a product, CMS page or configuration alone does not trigger this observer. The ban covers a host rather than only the changed page or entity tag. The module does not warm cache; subsequent requests rebuild responses. CDN, browser and other layers still affect freshness. Distinguish local command errors, a successful ban and a stale response from another layer.

For acceptance retain settings, record scope, expected and observed results and the test date. Compare data again after deployment. When the module uses a schedule or queue, inspect actual execution and logs rather than treating a submitted-job confirmation as proof of completion.

Acceptance example

Example: two views use different domains but share a CMS block. After changing it, check both hosts in the log and request both pages again. The first refreshed domain does not complete the whole test.

Check features and configuration in the offering for Kowal Purge Varnish Cache.

Previous Next

KOWAL.BLOG

Choose your language

Available versions open the corresponding page. More languages are being prepared.

English (UK) Français Deutsch Español Italiano Português Nederlands Svenska Dansk Norsk Suomi Lietuvių Latviešu Eesti Čeština Slovenčina Magyar Română Български Ελληνικά Slovenščina Hrvatski Polski English (US)