function Context::getCacheMaxAge

Same name in other branches
  1. 9 core/lib/Drupal/Core/Plugin/Context/Context.php \Drupal\Core\Plugin\Context\Context::getCacheMaxAge()
  2. 8.9.x core/lib/Drupal/Core/Plugin/Context/Context.php \Drupal\Core\Plugin\Context\Context::getCacheMaxAge()
  3. 11.x core/lib/Drupal/Core/Plugin/Context/Context.php \Drupal\Core\Plugin\Context\Context::getCacheMaxAge()

Overrides CacheableDependencyInterface::getCacheMaxAge

File

core/lib/Drupal/Core/Plugin/Context/Context.php, line 167

Class

Context
A Drupal specific context wrapper class.

Namespace

Drupal\Core\Plugin\Context

Code

public function getCacheMaxAge() {
    return $this->cacheabilityMetadata
        ->getCacheMaxAge();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.