RefinableCacheableDependencyTrait::mergeCacheMaxAge

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

RefinableCacheableDependencyTrait::getCacheTags

public RefinableCacheableDependencyTrait::getCacheTags() The cache tags associated with this object. When this object is modified, these cache tags will be invalidated. Return value string[] A set of cache tags. Overrides CacheableDependencyInterface::getCacheTags File core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php, line 34 Class RefinableCacheableDependencyTrait Trait for \Drupal\Core\Cache\RefinableCacheableDependencyInterface. Namespace Drupal\Core\Cache Code publ

RefinableCacheableDependencyTrait::getCacheMaxAge

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 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 getCacheM

RefinableCacheableDependencyTrait::getCacheContexts

public RefinableCacheableDependencyTrait::getCacheContexts() The cache contexts associated with this object. These identify a specific variation/representation of the object. Cache contexts are tokens: placeholders that are converted to cache keys by the @cache_contexts_manager service. The replacement value depends on the request context (the current URL, language, and so on). They're converted before storing an object in cache. Return value string[] An array of cache context tokens, used to

RefinableCacheableDependencyTrait::addCacheTags

public RefinableCacheableDependencyTrait::addCacheTags(array $cache_tags) Adds cache tags. Parameters string[] $cache_tags: The cache tags to be added. Return value $this Overrides RefinableCacheableDependencyInterface::addCacheTags File core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php, line 81 Class RefinableCacheableDependencyTrait Trait for \Drupal\Core\Cache\RefinableCacheableDependencyInterface. Namespace Drupal\Core\Cache Code public function addCacheTags(array

RefinableCacheableDependencyTrait::addCacheContexts

public RefinableCacheableDependencyTrait::addCacheContexts(array $cache_contexts) Adds cache contexts. Parameters string[] $cache_contexts: The cache contexts to be added. Return value $this Overrides RefinableCacheableDependencyInterface::addCacheContexts File core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php, line 71 Class RefinableCacheableDependencyTrait Trait for \Drupal\Core\Cache\RefinableCacheableDependencyInterface. Namespace Drupal\Core\Cache Code public func

RefinableCacheableDependencyTrait::addCacheableDependency

public RefinableCacheableDependencyTrait::addCacheableDependency($other_object) Adds a dependency on an object: merges its cacheability metadata. Parameters \Drupal\Core\Cache\CacheableDependencyInterface|object $other_object: The dependency. If the object implements CacheableDependencyInterface, then its cacheability metadata will be used. Otherwise, the passed in object must be assumed to be uncacheable, so max-age 0 is set. Return value $this Overrides RefinableCacheableDependencyInterface

RefinableCacheableDependencyTrait::$cacheTags

Cache tags. Type: string[] File core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php, line 22 Class RefinableCacheableDependencyTrait Trait for \Drupal\Core\Cache\RefinableCacheableDependencyInterface. Namespace Drupal\Core\Cache Code protected $cacheTags = [];

RefinableCacheableDependencyTrait::$cacheMaxAge

Cache max-age. Type: int File core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php, line 29 Class RefinableCacheableDependencyTrait Trait for \Drupal\Core\Cache\RefinableCacheableDependencyInterface. Namespace Drupal\Core\Cache Code protected $cacheMaxAge = Cache::PERMANENT;

RefinableCacheableDependencyTrait::$cacheContexts

Cache contexts. Type: string[] File core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php, line 15 Class RefinableCacheableDependencyTrait Trait for \Drupal\Core\Cache\RefinableCacheableDependencyInterface. Namespace Drupal\Core\Cache Code protected $cacheContexts = [];