/Drupal 8

interface CacheableDependencyInterface

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

All cacheability metadata exposed in this interface is bubbled to parent objects when they are cached: if a child object needs to be varied by certain cache contexts, invalidated by certain cache tags, expire after a certain maximum age, then so should any parent object.


Related topics

Cache API
Information about the Drupal Cache API


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




Name Modifiers Type Description
CacheableDependencyInterface::getCacheContexts public function The cache contexts associated with this object. Overrides CacheableDependencyInterface::getCacheContexts
CacheableDependencyInterface::getCacheMaxAge public function The maximum age for which this object may be cached. Overrides CacheableDependencyInterface::getCacheMaxAge
CacheableDependencyInterface::getCacheTags public function The cache tags associated with this object. Overrides CacheableDependencyInterface::getCacheTags

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.