I have a static part which is included on every page (navigation), but takes long to generate. That is why I have set a cache lifetime and a static cache key.

Works fine, until FPC is enabled. Then the block is still generated again for a newly called page and not served from the block cache.

There is this line in Enterprise_PageCache_Model_Observer:

    ->banUse(Mage_Core_Block_Abstract::CACHE_GROUP); // disable blocks cache

What is the reason for this? It makes sense to me to still cache certain blocks, even if FPC is on - because otherwise generation of pages which are not fully served from the cache are slowed down.

  1. What is the design decission behind that?
  2. What is a good solution around that?
  3. Would it be harmful if I just remove this block cache banning?
  • know this is an old question, but did you find anything on this? – xelber Jun 25 '15 at 2:56

This bug has been fixed in Magento (ref http://merch.docs.magento.com/ee/user_guide/magento/release-notes-ee-1.14.2.html under Known Issues)

  • 2
    I have just bummed into this on I can see the logic has changed over time. The code is surrounded by the if: if ($this->_processor->canProcessRequest($request) && ($request->isStraight() || $this->_processor->getRequestProcessor($request)) ) { Mage::app()->getCacheInstance()->banUse(Mage_Core_Block_Abstract::CACHE_GROUP); } but I can't find anything as to the reasoning behind why you would ban the block cache. Can you enlighten more? – PanPipes Apr 19 '16 at 19:17

To be able to disable FPC for dynamic blocks, for instance, in checkout or cart page. About 3rd question, in my opinion you should not do this which is might broken FPC process ( to be frank, to give right answer, we should check source code as well ).

  • Is your first part concerning my first question? If yes, why does the block cache need to be disabled in order to disable FPC in checkout or cart page? In fact, block cache is only disabled if the whole page is cached. – Alex Jan 30 '13 at 18:46
  • Just I checked the source code which is controlling the user cookies. If user has blocked the cookie, FPC blocking the caches. _getCookie function returns Enterprise_PageCache_Model_Cookie instance which is controlling the user cookie. – Oğuz Çelikdemir Jan 30 '13 at 21:06
  • What does that have to do with the cookie? And which code line are you talking about? confused – Alex Jan 31 '13 at 11:24
  • Alex, tonight I will check again and send you the necessary code blocks. – Oğuz Çelikdemir Jan 31 '13 at 12:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.