Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. CachePluginBase.php

function CachePluginBase::getCacheMaxAge

Gets the max age for the current view.

Return value

int

File

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

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

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal