function Sql::getCacheTags
Same name in other branches
- 9 core/modules/views/src/Plugin/views/query/Sql.php \Drupal\views\Plugin\views\query\Sql::getCacheTags()
- 8.9.x core/modules/views/src/Plugin/views/query/Sql.php \Drupal\views\Plugin\views\query\Sql::getCacheTags()
- 11.x core/modules/views/src/Plugin/views/query/Sql.php \Drupal\views\Plugin\views\query\Sql::getCacheTags()
Overrides QueryPluginBase::getCacheTags
File
-
core/
modules/ views/ src/ Plugin/ views/ query/ Sql.php, line 1695
Class
- Sql
- Views query plugin for an SQL query.
Namespace
Drupal\views\Plugin\views\queryCode
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.