Example #1
0
 /**
  * Get cache key informative items
  *
  * Provide string array key to share specific info item with FPC placeholder
  *
  * @return array
  */
 public function getCacheKeyInfo()
 {
     if ($this->_cacheKeyInfo === null) {
         $this->_cacheKeyInfo = parent::getCacheKeyInfo() + ['crumbs' => base64_encode(serialize($this->_crumbs)), 'name' => $this->getNameInLayout()];
     }
     return $this->_cacheKeyInfo;
 }
Example #2
0
 /**
  * Get cache key informative items
  *
  * Provide string array key to share specific info item with FPC placeholder
  *
  * @return array
  */
 public function getCacheKeyInfo()
 {
     if (is_null($this->_cacheKeyInfo)) {
         $this->_cacheKeyInfo = parent::getCacheKeyInfo() + array('crumbs' => base64_encode(serialize($this->_crumbs)), 'name' => $this->getNameInLayout());
     }
     return $this->_cacheKeyInfo;
 }
 public function testGetCacheKeyInfo()
 {
     $this->assertArrayHasKey('template', $this->_block->getCacheKeyInfo());
 }
Example #4
0
 /**
  * Get cache key informative items
  *
  * @return array
  */
 public function getCacheKeyInfo()
 {
     $keyInfo = parent::getCacheKeyInfo();
     $keyInfo[] = $this->getUrl('*/*/*', ['_current' => true, '_query' => '']);
     return $keyInfo;
 }
Example #5
0
 public function testGetCacheKeyInfo()
 {
     $this->assertEquals(['BLOCK_TPL', 'storeCode', null, 'base_url' => 'baseUrl', 'template' => 'template.phtml'], $this->block->getCacheKeyInfo());
 }