You are here

public function CachePluginBase::getCacheMaxAge in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/views/src/Plugin/views/cache/CachePluginBase.php \Drupal\views\Plugin\views\cache\CachePluginBase::getCacheMaxAge()

Gets the max age for the current view.

Return value

int

File

core/modules/views/src/Plugin/views/cache/CachePluginBase.php, line 260

Class

CachePluginBase
The base plugin to handle caching.

Namespace

Drupal\views\Plugin\views\cache

Code

public function getCacheMaxAge() {
  $max_age = $this
    ->getDefaultCacheMaxAge();
  $max_age = Cache::mergeMaxAges($max_age, $this->view
    ->getQuery()
    ->getCacheMaxAge());
  return $max_age;
}