function RefinableCacheableDependencyInterface::mergeCacheMaxAge
Same name in other branches
- 9 core/lib/Drupal/Core/Cache/RefinableCacheableDependencyInterface.php \Drupal\Core\Cache\RefinableCacheableDependencyInterface::mergeCacheMaxAge()
- 10 core/lib/Drupal/Core/Cache/RefinableCacheableDependencyInterface.php \Drupal\Core\Cache\RefinableCacheableDependencyInterface::mergeCacheMaxAge()
- 11.x core/lib/Drupal/Core/Cache/RefinableCacheableDependencyInterface.php \Drupal\Core\Cache\RefinableCacheableDependencyInterface::mergeCacheMaxAge()
Merges the maximum age (in seconds) with the existing maximum age.
The max age will be set to the given value if it is lower than the existing value.
Parameters
int $max_age: The max age to associate.
Return value
$this
Throws
\InvalidArgumentException Thrown if a non-integer value is supplied.
1 method overrides RefinableCacheableDependencyInterface::mergeCacheMaxAge()
- ViewUI::mergeCacheMaxAge in core/
modules/ views_ui/ src/ ViewUI.php - Merges the maximum age (in seconds) with the existing maximum age.
File
-
core/
lib/ Drupal/ Core/ Cache/ RefinableCacheableDependencyInterface.php, line 49
Class
- RefinableCacheableDependencyInterface
- Allows to add cacheability metadata to an object for the current runtime.
Namespace
Drupal\Core\CacheCode
public function mergeCacheMaxAge($max_age);
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.