/** * {@inheritdoc} */ public function getCacheTags() { // Even when the menu block renders to the empty string for a user, we want // the cache tag for this menu to be set: whenever the menu is changed, this // menu block must also be re-rendered for that user, because maybe a menu // link that is accessible for that user has been added. $cache_tags = parent::getCacheTags(); $cache_tags[] = 'config:system.menu.' . $this->getDerivativeId(); return $cache_tags; }
/** * {@inheritdoc} */ public function getCacheTags() { return Cache::mergeTags(parent::getCacheTags(), $this->configFactory->get('system.site')->getCacheTags()); }
/** * {@inheritdoc} */ public function getCacheTags() { // The theme-specific cache tag is set automatically for each block, but the // output of this block also depends on the global theme settings. $cache_tags = parent::getCacheTags(); $cache_tags[] = 'theme_global_setting'; return $cache_tags; }
/** * {@inheritdoc} */ public function getCacheTags() { $cache_tags = parent::getCacheTags(); $feed = $this->feedStorage->load($this->configuration['feed']); return Cache::mergeTags($cache_tags, $feed->getCacheTags()); }
/** * {@inheritdoc} */ public function getCacheTags() { return Cache::mergeTags(parent::getCacheTags(), ['node_list']); }
/** * {@inheritdoc} */ public function getCacheTags() { // @todo: This is a temporary workaround for the lack of og cache // contexts/tags. Remove this when Og provides proper cache context and // instead add the proper context to the getCacheContexts method. // @see: https://webgate.ec.europa.eu/CITnet/jira/browse/ISAICP-2628 return Cache::mergeContexts(parent::getCacheTags(), ['user.roles']); }
/** * Implements \Drupal\Core\Entity\Entity::getCacheTags(). */ public function getCacheTags() { if ($node = $this->routeMatch->getParameter('node')) { $cache_tags = Cache::mergeTags($node->getCacheTags(), ['node_list']); return Cache::mergeTags(parent::getCacheTags(), $cache_tags); } else { return parent::getCacheTags(); } }
/** * {@inheritdoc} */ public function getCacheTags() { $parent_tags = parent::getCacheTags(); return Cache::mergeTags($parent_tags, $this->ivwTracker->getCacheTags()); }