How Broad Magento 2 Cache Tags Trigger Store-Wide Performance Crashes
Magento 2 uses a hierarchical cache tag system to invalidate stored page, block, and data fragments when content changes, but overly broad tags like cat_p can cause mass cache invalidation across an entire store. A single product save that triggers the cat_p tag can send tens of thousands of BAN requests to Varnish, crashing cache hit rates from over 90% to as low as 12%. The root cause is typically custom blocks or widgets that fail to implement granular getIdentities() methods, falling back to global tags instead of product-specific ones. Developers can audit the problem by intercepting cache writes, monitoring Varnish BAN request volumes, or using profiling tools like Blackfire to measure invalidation counts per save. The recommended fix is to tag cache entries only with specific entity IDs rather than category-wide or product-wide tags, unless a full cache flush is genuinely required.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in