You are here

public function VariationCache::__construct in VariationCache 8

Constructs a new VariationCache object.

Parameters

\Symfony\Component\HttpFoundation\RequestStack $request_stack: The request stack.

\Drupal\Core\Cache\CacheBackendInterface $cache_backend: The cache backend to wrap.

\Drupal\Core\Cache\Context\CacheContextsManager $cache_contexts_manager: The cache contexts manager.

File

src/Cache/VariationCache.php, line 50

Class

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

Namespace

Drupal\variationcache\Cache

Code

public function __construct(RequestStack $request_stack, CacheBackendInterface $cache_backend, CacheContextsManager $cache_contexts_manager) {
  $this->requestStack = $request_stack;
  $this->cacheBackend = $cache_backend;
  $this->cacheContextsManager = $cache_contexts_manager;
}