public function Sql::getCacheMaxAge in Drupal 8
Same name and namespace in other branches
- 9 core/modules/views/src/Plugin/views/query/Sql.php \Drupal\views\Plugin\views\query\Sql::getCacheMaxAge()
The maximum age for which this object may be cached.
Return value
int The maximum time in seconds that this object may be cached.
Overrides QueryPluginBase::getCacheMaxAge
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\queryCode
public function getCacheMaxAge() {
$max_age = parent::getCacheMaxAge();
foreach ($this
->getAllEntities() as $entity) {
$max_age = Cache::mergeMaxAges($max_age, $entity
->getCacheMaxAge());
}
return $max_age;
}