Magento-Don';t缓存货币

Magento-Don';t缓存货币,magento,Magento,我已在我的Magento商店上安装了此扩展: 它确实缩短了目录列表的页面加载时间。问题是,如果我更改了存储货币,它将不会在页面上更新,并且缓存的货币将继续显示。有什么办法使货币变动生效吗 以下是扩展名中的代码: class Netresearch_CatalogCache_Block_Product_List extends Mage_Catalog_Block_Product_List { protected function _isCacheActive() {

我已在我的Magento商店上安装了此扩展:

它确实缩短了目录列表的页面加载时间。问题是,如果我更改了存储货币,它将不会在页面上更新,并且缓存的货币将继续显示。有什么办法使货币变动生效吗

以下是扩展名中的代码:

class Netresearch_CatalogCache_Block_Product_List extends Mage_Catalog_Block_Product_List
{
    protected function _isCacheActive()
    {
        if(!Mage::getStoreConfig('catalog/frontend/cache_list')) {
            return false;
        }

        /* if there are any messages dont read from cache to show them */
        if(Mage::getSingleton('core/session')->getMessages(true)->count() > 0) {
            return false;
        }
        return true;

    }

    public function getCacheLifetime()
    {
        if($this->_isCacheActive())
        {
            return 2419200;;
        }
    }
/*
    protected function _loadCache()
    {

        $cache = parent::_loadCache();
        Mage::debug($cache === false ? "computed" : "from cache");
        return $cache;
    }
*/
    public function getCacheKey()
    {
        if(!$this->_isCacheActive()) {
            parent::getCacheKey();
        }
        $_taxRateRequest = Mage::getModel('tax/calculation')->getRateRequest();
        $_customer = Mage::getSingleton('customer/session')->getCustomer();
        $this->_category = Mage::getSingleton('catalog/layer')->getCurrentCategory();
        $_page = $this->getPage();

        $toolbar = new Mage_Catalog_Block_Product_List_Toolbar();
        $return = 'ProductView_'.
            /* Create differnet caches for differnt...
             * ... categories */
            $this->_category->getId().'_'.
            /* ... orders */
            $toolbar->getCurrentOrder().'_'.
            /* ... direction */
            $toolbar->getCurrentDirection().'_'.
            /* ... mode */
            $toolbar->getCurrentMode().'_'.
            /* ... page */
            $toolbar->getCurrentPage().'_'.
            /* ... items per page */
            $toolbar->getLimit().'_'.
            /* ... stores */
            Mage::App()->getStore()->getCode().'_'.
            /* ... customer groups */
            $_customer->getGroupId().'_'.
            $_taxRateRequest->getCountryId()."_".$_taxRateRequest->getRegionId()."_".$_taxRateRequest->getPostcode()."_".$_taxRateRequest->getCustomerClassId()."_".
            /* ... tags */
            Mage::registry('current_tag').'_'.
            '';
            /* ... layern navigation + search */
            foreach(Mage::app()->getRequest()->getParams() as $key=>$value) {
                $return .= $key.'-'.$value.'_';
            }
        return $return;
    }


    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;

    }
}
这里也讨论了货币缓存,但我仍然不确定该怎么做:

您可以尝试为您的货币代码添加唯一的ID:

        /* ... items per page */
        $toolbar->getLimit().'_'.
        /* ... stores */
        Mage::App()->getStore()->getCode().'_'.
        /*** ADD CURRENCY CODE TO ID ***/
        Mage::app()->getStore()->getCurrentCurrencyCode().'_'.
        /* ... customer groups */
        $_customer->getGroupId().'_'.

刷新缓存时它不会更新吗?是的,它会更新。但是,如果用户/客户使用前端货币选择器更改货币,则不会进行更新。这就是我的问题所在。