function VariationCache::delete

Same name and namespace in other branches
  1. 10 core/lib/Drupal/Core/Cache/VariationCache.php \Drupal\Core\Cache\VariationCache::delete()

Overrides VariationCacheInterface::delete

File

core/lib/Drupal/Core/Cache/VariationCache.php, line 142

Class

VariationCache
Wraps a regular cache backend to make it support cache contexts.

Namespace

Drupal\Core\Cache

Code

public function delete(array $keys, CacheableDependencyInterface $initial_cacheability) : void {
    $chain = $this->getRedirectChain($keys, $initial_cacheability);
    $this->cacheBackend
        ->delete(array_key_last($chain));
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.