CacheRedirect.php
Same filename in other branches
Namespace
Drupal\Core\CacheFile
-
core/
lib/ Drupal/ Core/ Cache/ CacheRedirect.php
View source
<?php
namespace Drupal\Core\Cache;
/**
* Defines a value object to represent a cache redirect.
*
* @see \Drupal\Core\Cache\VariationCache::get()
* @see \Drupal\Core\Cache\VariationCache::set()
*
* @ingroup cache
* @internal
*/
class CacheRedirect implements CacheableDependencyInterface {
use CacheableDependencyTrait;
/**
* Constructs a CacheRedirect object.
*
* @param \Drupal\Core\Cache\CacheableDependencyInterface $cacheability
* The cacheability to redirect to.
*
* @see \Drupal\Core\Cache\VariationCache::createCacheIdFast()
*/
public function __construct(CacheableDependencyInterface $cacheability) {
// Cache redirects only care about cache contexts.
$this->cacheContexts = $cacheability->getCacheContexts();
}
}
Classes
Title | Deprecated | Summary |
---|---|---|
CacheRedirect | Defines a value object to represent a cache redirect. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.