ViewExecutable::getCacheTags

public ViewExecutable::getCacheTags()

Gets the cache tags associated with the executed view.

Note: The cache plugin controls the used tags, so you can override it, if needed.

Return value

string[] An array of cache tags.

File

core/modules/views/src/ViewExecutable.php, line 1549

Class

ViewExecutable
Represents a view as a whole.

Namespace

Drupal\views

Code

public function getCacheTags() {
  $this->initDisplay();
  /** @var \Drupal\views\Plugin\views\cache\CachePluginBase $cache */
  $cache = $this->display_handler->getPlugin('cache');
  return $cache->getCacheTags();
}
doc_Drupal
2016-10-29 09:54:19
Comments
Leave a Comment

Please login to continue.