/** * Get tags array for saving cache * * @return array */ public function getCacheTags() { $tags = parent::getDefaultTags(); $tags[] = Mage_Catalog_Model_Product::CACHE_TAG; $tags[] = Mage_Catalog_Model_Category::CACHE_TAG . '_' . Mage::app()->getRequest()->getParam('id'); return $tags; }
/** * Get cache key informative items * * @return array */ public function getCacheKeyInfo() { $keys = $this->getBlock()->getCacheKeyInfo() + parent::getDefaultKeys(); $keys[] = (int) Mage::app()->getStore()->isCurrentlySecure(); $keys[] = Mage::app()->getStore()->getCurrentCurrencyCode(); $keys[] = Mage::getSingleton('customer/session')->isLoggedIn() ? 'loggedin' : 'loggedout'; $keys[] = $this->getBlock()->getNameInLayout(); $keys[] = 'product_' . $this->getProductId(); $keys[] = 'review_product_view'; return $keys; }
/** * Get cache key informative items * * @return array */ public function getCacheKeyInfo() { return $this->getBlock()->getCacheKeyInfo() + parent::getDefaultKeys(); }