/** * Get cahce tags associated with object id * * @return array */ public function getCacheIdTags() { $tags = parent::getCacheIdTags(); $affectedCategoryIds = $this->getAffectedCategoryIds(); if (!$affectedCategoryIds) { $affectedCategoryIds = $this->getCategoryIds(); } foreach ($affectedCategoryIds as $categoryId) { $tags[] = Mage_Catalog_Model_Category::CACHE_TAG . '_' . $categoryId; } return $tags; }