Engineering
Make Sure Your Magento 2 Full Page Cache Is Actually Working
Author
Dan Kozlowski
Date Published
While submitting an extension to the Magento Marketplace, our build was rejected for cache validation failures — pages were missing full-page-cache HIT headers. The cause was subtle and worth knowing.
The cause: cacheable="false"
If ANY block included in a page has cacheable="false" in a layout file, it disables full page caching for the entire page. In our case a store-locator block had been marked non-cacheable, which quietly disabled caching site-wide.
1<block class="Xumulus\Locator\Block\Link" cacheable="false" name="store-locator-link" template="Store_Locator::link.phtml">
How to test it
- Enable Developer Mode.
- Open the browser network tab and inspect the page response headers.
- Look for X-Magento-Cache-Debug: MISS on first load.
- Refresh — it should flip to HIT. If it stays MISS, a block is disabling the cache.
This check is now part of our standard Magento QA process — one cacheable="false" can undo all of your full-page-cache performance work.