Bypass Magento Full Page Cache on Single Page

You don't want to use hole-punching as there are several blocks on the page that have to be dynamic

Posted on April 6, 2016 in Magento

Here is the solution for disabling FPC for a specific controller by listen on the controller_action_predispatch event:

public function processPreDispatch(Varien_Event_Observer $observer) {
    $action = $observer->getEvent()->getControllerAction();

    if($action instanceof Mage_Catalog_ProductController) {
        $cache = Mage::app()->getCacheInstance();

Then add the following to your config.xml file for the module. This goes in the <frontend> section:


Now Magento will server up your page every time and bypass FPC for the request.

comments powered by Disqus