function CacheableDependencyInterface::getCacheMaxAge

Same name in other branches
  1. 8.9.x core/lib/Drupal/Core/Cache/CacheableDependencyInterface.php \Drupal\Core\Cache\CacheableDependencyInterface::getCacheMaxAge()
  2. 10 core/lib/Drupal/Core/Cache/CacheableDependencyInterface.php \Drupal\Core\Cache\CacheableDependencyInterface::getCacheMaxAge()
  3. 11.x core/lib/Drupal/Core/Cache/CacheableDependencyInterface.php \Drupal\Core\Cache\CacheableDependencyInterface::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. An object may be cached permanently by returning \Drupal\Core\Cache\Cache::PERMANENT.

34 methods override CacheableDependencyInterface::getCacheMaxAge()
ArgumentPluginBase::getCacheMaxAge in core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php
The maximum age for which this object may be cached.
BulkForm::getCacheMaxAge in core/modules/views/src/Plugin/views/field/BulkForm.php
The maximum age for which this object may be cached.
CacheableMetadataCalculationTest::getCacheMaxAge in core/modules/views/tests/modules/views_test_cacheable_metadata_calculation/src/Plugin/views/access/CacheableMetadataCalculationTest.php
The maximum age for which this object may be cached.
ComputedString::getCacheMaxAge in core/modules/system/tests/modules/entity_test/src/TypedData/ComputedString.php
The maximum age for which this object may be cached.
Context::getCacheMaxAge in core/lib/Drupal/Core/Plugin/Context/Context.php
The maximum age for which this object may be cached.

... See full list

File

core/lib/Drupal/Core/Cache/CacheableDependencyInterface.php, line 52

Class

CacheableDependencyInterface
Defines an interface for objects which may be used by other cached objects.

Namespace

Drupal\Core\Cache

Code

public function getCacheMaxAge();

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