/** * Checks whether exists design exception value in cache. * If not, gets it from config and puts into cache * * @return Enterprise_PageCache_Model_Observer */ protected function _saveDesignException() { if (!$this->isCacheEnabled()) { return $this; } $cacheId = Enterprise_PageCache_Model_Processor::DESIGN_EXCEPTION_KEY; if (!Enterprise_PageCache_Model_Cache::getCacheInstance()->getFrontend()->test($cacheId)) { $exception = Mage::getStoreConfig(self::XML_PATH_DESIGN_EXCEPTION); Enterprise_PageCache_Model_Cache::getCacheInstance()->save($exception, $cacheId, array(Enterprise_PageCache_Model_Processor::CACHE_TAG)); $this->_processor->refreshRequestIds(); } return $this; }
/** * Checks whether exists design exception value in cache. * If not, gets it from config and puts into cache * * @return Enterprise_PageCache_Model_Observer */ protected function _saveDesignException() { if (!$this->isCacheEnabled()) { return $this; } if (isset($_COOKIE[Mage_Core_Model_Store::COOKIE_NAME])) { $storeIdentifier = $_COOKIE[Mage_Core_Model_Store::COOKIE_NAME]; } else { $storeIdentifier = Mage::app()->getRequest()->getHttpHost() . Mage::app()->getRequest()->getBaseUrl(); } $exceptions = $this->_loadDesignExceptions(); if (!isset($exceptions[$storeIdentifier])) { $exceptions[$storeIdentifier][self::XML_PATH_DESIGN_EXCEPTION] = Mage::getStoreConfig(self::XML_PATH_DESIGN_EXCEPTION); foreach ($this->_themeExceptionTypes as $type) { $configPath = sprintf('design/theme/%s_ua_regexp', $type); $exceptions[$storeIdentifier][$configPath] = Mage::getStoreConfig($configPath); } $this->_saveDesignExceptions($exceptions); $this->_processor->refreshRequestIds(); } return $this; }