/** * Get cache key informative items. * * @return array */ public function getCacheKeyInfo() { if (null === $this->_cacheKeyInfo) { $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)) { $links = []; if (!empty($this->_links)) { foreach ($this->_links as $position => $link) { if ($link instanceof Object) { $links[$position] = $link->getData(); } } } $this->_cacheKeyInfo = parent::getCacheKeyInfo() + ['links' => base64_encode(serialize($links)), 'name' => $this->getNameInLayout()]; } return $this->_cacheKeyInfo; }