Skip to content
Browse files

MEXT-37: add currency to cache key

  • Loading branch information...
1 parent 9a1067f commit 7a6be16673f435cd5f5086087fd1d7d2c5f426bb Thomas Birke committed
View
4 app/code/community/Netresearch/CatalogCache/Block/Layer/View.php
@@ -82,6 +82,8 @@ public function getCacheKey()
$toolbar->getLimit().'_'.
/* ... stores */
Mage::App()->getStore()->getCode().'_'.
+ /* ... currency */
+ Mage::App()->getStore()->getCurrentCurrencyCode().'_'.
/* ... customer groups */
$_customer->getGroupId().'_'.
$_taxRateRequest->getCountryId()."_".$_taxRateRequest->getRegionId()."_".$_taxRateRequest->getPostcode()."_".$_taxRateRequest->getCustomerClassId()."_".
@@ -107,4 +109,4 @@ public function getCacheTags()
);
return $cacheTags;
}
-}
+}
View
8 app/code/community/Netresearch/CatalogCache/Block/Product/List.php
@@ -67,7 +67,7 @@ public function getCacheKey()
$_page = $this->getPage();
$toolbar = new Mage_Catalog_Block_Product_List_Toolbar();
- $return = 'ProductView_'.
+ $cacheKey = 'ProductView_'.
/* Create differnet caches for differnt...
* ... categories */
$this->_category->getId().'_'.
@@ -83,6 +83,8 @@ public function getCacheKey()
$toolbar->getLimit().'_'.
/* ... stores */
Mage::App()->getStore()->getCode().'_'.
+ /* ... currency */
+ Mage::App()->getStore()->getCurrentCurrencyCode().'_'.
/* ... customer groups */
$_customer->getGroupId().'_'.
$_taxRateRequest->getCountryId()."_".$_taxRateRequest->getRegionId()."_".$_taxRateRequest->getPostcode()."_".$_taxRateRequest->getCustomerClassId()."_".
@@ -91,9 +93,9 @@ public function getCacheKey()
'';
/* ... layern navigation + search */
foreach(Mage::app()->getRequest()->getParams() as $key=>$value) {
- $return .= $key.'-'.$value.'_';
+ $cacheKey .= $key.'-'.$value.'_';
}
- return $return;
+ return $cacheKey;
}
View
2 app/code/community/Netresearch/CatalogCache/Block/Product/View.php
@@ -77,6 +77,8 @@ public function getCacheKey()
$_product->getId().'_'.
/* ... for different stores */
Mage::App()->getStore()->getCode().'_'.
+ /* ... currency */
+ Mage::App()->getStore()->getCurrentCurrencyCode().'_'.
/* ... for differnet login state */
$this->helper('customer')->isLoggedIn().'_'.
/* ... for different customer groups */
View
4 app/code/community/Netresearch/CatalogCache/Block/Search/Layer.php
@@ -75,6 +75,8 @@ public function getCacheKey()
$toolbar->getLimit().'_'.
/* ... stores */
Mage::App()->getStore()->getCode().'_'.
+ /* ... currency */
+ Mage::App()->getStore()->getCurrentCurrencyCode().'_'.
/* ... customer groups */
$_customer->getGroupId().'_'.
$_taxRateRequest->getCountryId()."_".$_taxRateRequest->getRegionId()."_".$_taxRateRequest->getPostcode()."_".$_taxRateRequest->getCustomerClassId()."_".
@@ -105,4 +107,4 @@ public function getCacheTags()
*/
return $cacheTags;
}
-}
+}

0 comments on commit 7a6be16

Please sign in to comment.
Something went wrong with that request. Please try again.