You are here

public function VariationCache::get in VariationCache 8

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

See also

\Drupal\Core\Cache\CacheBackendInterface::get()

File

src/Cache/VariationCache.php, line 59

Class

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

Namespace

Drupal\variationcache\Cache

Code

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