You are here

public function AggregatorFeedBlock::getCacheTags in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/aggregator/src/Plugin/Block/AggregatorFeedBlock.php \Drupal\aggregator\Plugin\Block\AggregatorFeedBlock::getCacheTags()

Overrides ContextAwarePluginTrait::getCacheTags

File

core/modules/aggregator/src/Plugin/Block/AggregatorFeedBlock.php, line 168

Class

AggregatorFeedBlock
Provides an 'Aggregator feed' block with the latest items from the feed.

Namespace

Drupal\aggregator\Plugin\Block

Code

public function getCacheTags() {
  $cache_tags = parent::getCacheTags();
  if ($feed = $this->feedStorage
    ->load($this->configuration['feed'])) {
    $cache_tags = Cache::mergeTags($cache_tags, $feed
      ->getCacheTags());
  }
  return $cache_tags;
}