function VariationCacheInterface::invalidate
Same name in other branches
- 11.x core/lib/Drupal/Core/Cache/VariationCacheInterface.php \Drupal\Core\Cache\VariationCacheInterface::invalidate()
Marks a cache item as invalid.
To stay consistent with ::get(), this only affects the active variation, not all possible variations for the associated cache contexts.
Parameters
string[] $keys: The cache keys of the data to invalidate.
\Drupal\Core\Cache\CacheableDependencyInterface $initial_cacheability: The cache metadata of the data to store before other systems had a chance to adjust it. This is also commonly known as "pre-bubbling" cacheability.
See also
\Drupal\Core\Cache\CacheBackendInterface::invalidate()
1 method overrides VariationCacheInterface::invalidate()
- VariationCache::invalidate in core/
lib/ Drupal/ Core/ Cache/ VariationCache.php - Marks a cache item as invalid.
File
-
core/
lib/ Drupal/ Core/ Cache/ VariationCacheInterface.php, line 83
Class
- VariationCacheInterface
- Defines an interface for variation cache implementations.
Namespace
Drupal\Core\CacheCode
public function invalidate(array $keys, CacheableDependencyInterface $initial_cacheability) : void;
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.