public function getCacheKey() { if (!$this->_isCacheActive()) { parent::getCacheKey(); } $this->_category = Mage::getSingleton('catalog/layer')->getCurrentCategory(); $total = $this->_getProductCollection()->getSize(); Mage::getSingleton('core/session')->setSizeValue(''); $toolbar = new Mage_Catalog_Block_Product_List_Toolbar(); $cacheKey = 'ProductList_' . $this->_category->getId() . '_' . $toolbar->getCurrentOrder() . '_' . $toolbar->getCurrentDirection() . '_' . $toolbar->getCurrentMode() . '_' . $toolbar->getCurrentPage() . '_' . $toolbar->getLimit() . '_' . $total . '_' . Mage::App()->getStore()->getCode(); foreach (Mage::app()->getRequest()->getParams() as $key => $value) { if (is_array($value)) { $value = implode('_', $value); } $realValue = ''; $valueArray = array(); $valueArray = explode('_', $value); asort($valueArray); $value = implode('_', $valueArray); if (is_array($value)) { foreach ($value as $k => $v) { $realValue .= '_' . $v; } } else { $realValue = $value; } if (!in_array(strtolower($key), array('utm_source', 'utm_content', 'utm_campaign', 'utm_medium', 'utm_term', 'gclid'))) { $cacheKey .= "_" . $key . '-' . $realValue; } } return $cacheKey; }
public function getCacheKey() { if (!$this->_isCacheActive()) { parent::getCacheKey(); } $cacheKey = 'SwatchList_' . $this->getPid() . '_' . Mage::App()->getStore()->getCode() . '_' . ''; return $cacheKey; }