public function CacheRedirect::__construct in VariationCache 8
Constructs a CacheRedirect object.
Parameters
\Drupal\Core\Cache\CacheableDependencyInterface $cacheability: The cacheability to redirect to.
See also
\Drupal\variationcache\Cache\VariationCache::createRedirectedCacheId()
File
- src/
Cache/ CacheRedirect.php, line 28
Class
- CacheRedirect
- Defines a value object to represent a cache redirect with.
Namespace
Drupal\variationcache\CacheCode
public function __construct(CacheableDependencyInterface $cacheability) {
// Cache redirects only care about cache contexts.
$this->cacheContexts = $cacheability
->getCacheContexts();
}