You are here

public function CachePluginBase::getCacheMaxAge in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 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 251
Contains \Drupal\views\Plugin\views\cache\CachePluginBase.

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;
}