/** * 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; }
/** * 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()); }
/** * Get cache key informative items * * @return array */ public function getCacheKeyInfo() { $keyInfo = parent::getCacheKeyInfo(); $keyInfo[] = $this->getUrl('*/*/*', ['_current' => true, '_query' => '']); return $keyInfo; }
public function testGetCacheKeyInfo() { $this->assertEquals(['BLOCK_TPL', 'storeCode', null, 'base_url' => 'baseUrl', 'template' => 'template.phtml'], $this->block->getCacheKeyInfo()); }