Exemplo n.º 1
0
 public function getCacheTags()
 {
     if (!$this->_isCacheActive()) {
         return parent::getCacheTags();
     }
     $cacheTags = array(Mage_Catalog_Model_Category::CACHE_TAG, Mage_Catalog_Model_Category::CACHE_TAG . '_' . $this->_category->getId());
     foreach ($this->_getProductCollection() as $_product) {
         $cacheTags[] = Mage_Catalog_Model_Product::CACHE_TAG . "_" . $_product->getId();
     }
     return $cacheTags;
 }
Exemplo n.º 2
0
 /**
  * Retrieve block cache tags based on product collection
  *
  * @return array
  */
 public function getCacheTags()
 {
     return array_merge(parent::getCacheTags(), $this->getItemsTags($this->_getProductCollection()));
 }