/** * Make sure that the category view doesn't cache when there are * messages in the session * * @param Mage_Catalog_Block_Category_View $block * @return type */ public function applyCategoryView(Mage_Catalog_Block_Category_View $block) { // The "messages" block is session-dependent, don't cache if (Mage::helper('cache')->responseHasMessages()) { $block->setData('cache_lifetime', null); return; } }