HeadersCacheContext

Defines the HeadersCacheContext service, for "per header" caching.

Cache context ID: 'headers' (to vary by all headers). Calculated cache context ID: 'headers:%name', e.g. 'headers:X-Something' (to vary by the 'X-Something' header).

Hierarchy

File

core/lib/Drupal/Core/Cache/Context/HeadersCacheContext.php, line 14

Namespace

Drupal\Core\Cache\Context

Members

Name Modifiers Type Description
HeadersCacheContext::getCacheableMetadata public function Gets the cacheability metadata for the context based on the parameter value. Overrides CalculatedCacheContextInterface::getCacheableMetadata
HeadersCacheContext::getContext public function Returns the string representation of the cache context. Overrides CalculatedCacheContextInterface::getContext
HeadersCacheContext::getLabel public static function Returns the label of the cache context. Overrides CalculatedCacheContextInterface::getLabel
RequestStackCacheContextBase::$requestStack protected property The request stack.
RequestStackCacheContextBase::__construct public function Constructs a new RequestStackCacheContextBase class.
doc_Drupal
2016-10-29 09:17:32
Comments
Leave a Comment

Please login to continue.