public RefinableCacheableDependencyTrait::mergeCacheMaxAge($max_age)
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.
Overrides RefinableCacheableDependencyInterface::mergeCacheMaxAge
File
- core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php, line 91
Class
- RefinableCacheableDependencyTrait
- Trait for \Drupal\Core\Cache\RefinableCacheableDependencyInterface.
Namespace
Drupal\Core\Cache
Code
public function mergeCacheMaxAge($max_age) { $this->cacheMaxAge = Cache::mergeMaxAges($this->cacheMaxAge, $max_age); return $this; }
Please login to continue.