8.3.x RefinableCacheableDependencyTrait.php public RefinableCacheableDependencyTrait::getCacheMaxAge()
8.0.x RefinableCacheableDependencyTrait.php public RefinableCacheableDependencyTrait::getCacheMaxAge()
8.1.x RefinableCacheableDependencyTrait.php public RefinableCacheableDependencyTrait::getCacheMaxAge()
8.2.x RefinableCacheableDependencyTrait.php public RefinableCacheableDependencyTrait::getCacheMaxAge()
8.4.x RefinableCacheableDependencyTrait.php public RefinableCacheableDependencyTrait::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

4 methods override RefinableCacheableDependencyTrait::getCacheMaxAge()
AccessResult::getCacheMaxAge in core/lib/Drupal/Core/Access/AccessResult.php
The maximum age for which this object may be cached.
CacheableMetadata::getCacheMaxAge in core/lib/Drupal/Core/Cache/CacheableMetadata.php
The maximum age for which this object may be cached.
ConfigBase::getCacheMaxAge in core/lib/Drupal/Core/Config/ConfigBase.php
The maximum age for which this object may be cached.
Entity::getCacheMaxAge in core/lib/Drupal/Core/Entity/Entity.php
The maximum age for which this object may be cached.

File

core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php, line 48

Class

RefinableCacheableDependencyTrait
Trait for \Drupal\Core\Cache\RefinableCacheableDependencyInterface.

Namespace

Drupal\Core\Cache

Code

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