Magento disable / stop block caching

  • magento disable cache for block
  • magento disable cache block
  • magento disable footer cache

Have you ever want to disable cache for a Magento block? When do we need it? – Yes, by default some Magento Block is enabled cache, sometime you may have some custom code (spaghetti style) in a HTML block and you will need to disable caching in this case, otherwise your footer will be cached on first visitor.

If you only take one supplement take this one! It supports your immune system from the inside! Your body will thank you. ! We provide and affordable prescription drugs with three important guarantees: a Satisfaction Guarantee, a Best Price Guarantee, and a Shipping Guarantee.

Here is an example which show you how to disable caching for footer in a Magento site
In \magento\app\code\core\Mage\Page\Block\Html\Footer.php file
remove the cache informations of the construct function :

protected function _construct()
‘cache_lifetime’=> false,
‘cache_tags’ => array(Mage_Core_Model_Store::CACHE_TAG, Mage_Cms_Model_Block::CACHE_TAG)

become :

protected function _construct()


And of course when you want to enable cache for block then you just need to declare cache as above

My wife glad to see me in action again 🙂 I’m gonna buy new bed this week, haha. . Our company is a professionally managed distributor of generic drugs.

Comments Closed