function 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 167
Class
- Context
- A Drupal specific context wrapper class.
Namespace
Drupal\Core\Plugin\ContextCode
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.