You are here

public function Context::getCacheMaxAge in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/Plugin/Context/Context.php \Drupal\Core\Plugin\Context\Context::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 CacheableDependencyInterface::getCacheMaxAge

File

core/lib/Drupal/Core/Plugin/Context/Context.php, line 171
Contains \Drupal\Core\Plugin\Context\Context.

Class

Context
A Drupal specific context wrapper class.

Namespace

Drupal\Core\Plugin\Context

Code

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