function Sql::getCacheTags

Overrides QueryPluginBase::getCacheTags

File

core/modules/views/src/Plugin/views/query/Sql.php, line 1687

Class

Sql
Views query plugin for an SQL query.

Namespace

Drupal\views\Plugin\views\query

Code

public function getCacheTags() {
  $tags = [];
  // Add cache tags for each row, if there is an entity associated with it.
  if (!$this->hasAggregate) {
    foreach ($this->getAllEntities() as $entity) {
      $tags = Cache::mergeTags($entity->getCacheTags(), $tags);
    }
  }
  return $tags;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.