Why Does Magento Invalidation of Full Page Caching on Product save actually make a page not cached and what does refresh do since it is not cached

Why Does Magento Invalidation of Full Page Caching on Product save actually make a page not cached and what does refresh do since it is not cached

July 5, 2026 · Illustrated author avatarBy Stefan Bogdanescu
Why Does Magento Invalidation of Full Page Caching on Product save actually make a page not cached and what does refresh do since it is not cached

The Mysteries of Magento FPC Invalidation: What Happens When You Save a Product?

As senior developers working with Magento, we often come across intriguing questions about caching mechanisms that can stump even the most seasoned professionals. One such question involves the behavior of Full Page Caching (FPC) when it comes to product saves.

The Conundrum: Why Do Products Invalidate FPC Upon Save?

When a product is saved in Magento, either through the admin panel or programmatically via an API, the system automatically invalidates the corresponding FPC. This action might seem straightforward at first glance, but it raises several critical questions:

  1. What exactly does “invalidation” mean? Does this simply prevent the cached version from being served, or is there a deeper mechanism at play?

  2. Why are all pages invalidated instead of just the affected ones? Shouldn’t Magento’s caching system be smart enough to only invalidate the pages that actually contain the updated product data?

  3. What happens when you refresh after invalidation? Is it true that refreshing the FPC simply serves up the cached version, ignoring any changes made in the meantime? Or is there a more complex interaction between the cache and the application layer?

Delving into the Code: Unraveling Magento’s Caching Logic

To better understand what happens during a product save, let’s examine some key sections of Magento’s caching system:

The Mage_Core_Model_Cache Class

The primary method for checking if a page is cached is processRequest($page). This function should set the body content with the cached response and return true if the page is cached. However, when FPC is invalidated after a product save, this method returns false, indicating that the page is no longer being served from cache.

public function processRequest($page)
{
    if ($this->canCache($page)) {
        // ... (omitted for brevity)

        $body = $this->getBodyContent($cacheId);
        $this->setPage($page, $body);

        return true;
    }

    return false;
}

The saveAction() Method in the ProductController

When a product is saved via the admin panel, the controller calls several methods, one of which is Mage::getModel('catalogrule/rule')->applyAllRulesToProduct($productId). This method triggers an event called catalogrule_after_apply.

The FPC module observes this event and fires the cleanCache method for the FPC tag. In effect, this deletes all FPC cache records associated with the product.

The Redis Cache: A Potential Solution to Magento’s Caching Woes

While Magento’s built-in caching mechanisms can be complex and difficult to optimize, third-party solutions like Redis provide a more efficient alternative. By leveraging Redis as your primary cache backend, you can potentially alleviate many of the performance issues associated with FPC invalidation.

Here are some key benefits of using Redis for caching in Magento:

  1. Improved Performance: Redis is an in-memory data structure store that offers significantly faster response times compared to traditional file-based or database-driven caching solutions.

  2. Better Handling of Dynamic Data: Redis allows you to cache dynamic content more effectively, reducing the load on your server during peak traffic periods.

  3. Easy Configuration and Scalability: Redis is designed for high availability and can be easily scaled horizontally using a cluster configuration.

Conclusion: The Need for Further Investigation

While our investigation has shed some light on Magento’s caching behavior when it comes to product saves, there are still many unanswered questions. It remains unclear why all pages are invalidated instead of just the affected ones, or why the Mage_Core_Model_Cache class fails to serve cached content after a save operation.

As developers, we must continue to explore the intricacies of Magento’s caching system and seek out best practices for optimizing performance in real-world scenarios. By staying up-to-date with the latest developments from Magento and their community, we can ensure that our clients’ e-commerce platforms remain efficient and reliable.

For more insights into Magento development and optimization techniques, be sure to check out our blog at https://laravelcompany.com. We regularly publish articles on various aspects of Magento development, including performance tuning, extension customization, and best practices for working with the platform.

Catalog Cache API Admin

Our network