Пример #1
0
 /**
  * Get Place Holder Block
  *
  * @return Mage_Core_Block_Abstract
  */
 protected function _getPlaceHolderBlock()
 {
     $blockName = $this->_placeholder->getAttribute('block');
     $block = new $blockName();
     $block->setTemplate($this->_placeholder->getAttribute('template'));
     $block->setLayout(Mage::app()->getLayout());
     $block->setSkipRenderTag(true);
     return $block;
 }
Пример #2
0
 /**
  * Save data to cache storage
  *
  * @param string $data
  * @param string $id
  * @param array $tags
  */
 protected function _saveCache($data, $id, $tags = array(), $lifetime = null)
 {
     $tags[] = Enterprise_PageCache_Model_Processor::CACHE_TAG;
     if (is_null($lifetime)) {
         $lifetime = $this->_placeholder->getAttribute('cache_lifetime') ? $this->_placeholder->getAttribute('cache_lifetime') : false;
     }
     /**
      * Replace all occurrences of session_id with unique marker
      */
     Enterprise_PageCache_Helper_Url::replaceSid($data);
     Mage::app()->getCache()->save($data, $id, $tags, $lifetime);
     return $this;
 }