public function SmartTag::getCacheTags in Tome 8
Gets an array of cache tags for the current view.
Return value
string[] An array of cache tags based on the current view.
Overrides CachePluginBase::getCacheTags
File
- modules/
tome_static/ modules/ tome_static_super_cache/ src/ Plugin/ views/ cache/ SmartTag.php, line 31
Class
- SmartTag
- Omits list cache tags from a View and expires cache on entity CRUD.
Namespace
Drupal\tome_static_super_cache\Plugin\views\cacheCode
public function getCacheTags() {
$tags = $this->view->storage
->getCacheTags();
$tags = Cache::mergeTags($tags, $this->view
->getQuery()
->getCacheTags());
$tags = Cache::mergeTags($tags, [
$this
->getTagForView($this->view),
]);
return $tags;
}