Magento: Page Cache anpassen
Das Caching könnt ihr in Magento wie folgt beeinflussen:
protected function _construct()
{
$this->addData(array(
'cache_lifetime' => 900,
'cache_tags' => array(Mage_Catalog_Model_Product::CACHE_TAG),
'cache_key' => $this->getCacheKey()
));
}
public function getCacheKey()
{
return $this->getRequest()->getRequestUri().$this->getCacheCurrencyCode();
}
//retreive current currency code
public function getCacheCurrencyCode()
{
return Mage::app()->getStore()->getCurrentCurrencyCode();
}
De-Aktivieren könnt ihr das Caching wie folgt:
protected function _construct()
{
$this->addData(array(
'cache_lifetime' => null,
'cache_tags' => array(Mage_Catalog_Model_Product::CACHE_TAG)
));
}

