function VariationCache::get

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

Gets a cache entry based on cache keys.

Parameters

string[] $keys: The cache keys to retrieve the cache entry for.

\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.

Return value

object|false The cache item or FALSE on failure.

Overrides VariationCacheInterface::get

File

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

Class

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

Namespace

Drupal\Core\Cache

Code

public function get(array $keys, CacheableDependencyInterface $initial_cacheability) {
  $chain = $this->getRedirectChain($keys, $initial_cacheability);
  return end($chain);
}

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