コード例 #1
0
ファイル: List.php プロジェクト: quafzi/Magento-CatalogCache
 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;
 }
コード例 #2
0
ファイル: List.php プロジェクト: kanotest15/cbmagento
 /**
  * Retrieve block cache tags based on product collection
  *
  * @return array
  */
 public function getCacheTags()
 {
     return array_merge(parent::getCacheTags(), $this->getItemsTags($this->_getProductCollection()));
 }