namespace Drupal\Core\Cache\Context

Same name in other branches
  1. 10 Drupal\Core\Cache\Context
  2. 11.x Drupal\Core\Cache\Context
  3. 8.9.x Drupal\Core\Cache\Context
Object name File name Summary
AccountPermissionsCacheContext core/lib/Drupal/Core/Cache/Context/AccountPermissionsCacheContext.php Defines the AccountPermissionsCacheContext service, for "per permission" caching.
CacheContextInterface core/lib/Drupal/Core/Cache/Context/CacheContextInterface.php Provides an interface for defining a cache context service.
CacheContextsManager core/lib/Drupal/Core/Cache/Context/CacheContextsManager.php Converts cache context tokens into cache keys.
CacheContextsPass core/lib/Drupal/Core/Cache/Context/CacheContextsPass.php Adds cache_contexts parameter to the container.
CalculatedCacheContextInterface core/lib/Drupal/Core/Cache/Context/CalculatedCacheContextInterface.php Provides an interface for defining a calculated cache context service.
ContextCacheKeys core/lib/Drupal/Core/Cache/Context/ContextCacheKeys.php A value object to store generated cache keys with its cacheability metadata.
CookiesCacheContext core/lib/Drupal/Core/Cache/Context/CookiesCacheContext.php Defines the CookiesCacheContext service, for "per cookie" caching.
HeadersCacheContext core/lib/Drupal/Core/Cache/Context/HeadersCacheContext.php Defines the HeadersCacheContext service, for "per header" caching.
IpCacheContext core/lib/Drupal/Core/Cache/Context/IpCacheContext.php Defines the IpCacheContext service, for "per IP address" caching.
IsFrontPathCacheContext core/lib/Drupal/Core/Cache/Context/IsFrontPathCacheContext.php Defines a cache context for whether the URL is the front page of the site.
IsSuperUserCacheContext core/lib/Drupal/Core/Cache/Context/IsSuperUserCacheContext.php Defines the IsSuperUserCacheContext service, for "super user or not" caching.
LanguagesCacheContext core/lib/Drupal/Core/Cache/Context/LanguagesCacheContext.php Defines the LanguagesCacheContext service, for "per language" caching.
MenuActiveTrailsCacheContext core/lib/Drupal/Core/Cache/Context/MenuActiveTrailsCacheContext.php Defines the MenuActiveTrailsCacheContext service.
PagersCacheContext core/lib/Drupal/Core/Cache/Context/PagersCacheContext.php Defines a cache context for "per page in a pager" caching.
PathCacheContext core/lib/Drupal/Core/Cache/Context/PathCacheContext.php Defines the PathCacheContext service, for "per URL path" caching.
PathParentCacheContext core/lib/Drupal/Core/Cache/Context/PathParentCacheContext.php Defines a cache context service for path parents.
ProtocolVersionCacheContext core/lib/Drupal/Core/Cache/Context/ProtocolVersionCacheContext.php Defines the ProtocolVersionCacheContext service, for "per protocol" caching.
QueryArgsCacheContext core/lib/Drupal/Core/Cache/Context/QueryArgsCacheContext.php Defines the QueryArgsCacheContext service, for "per query args" caching.
RequestFormatCacheContext core/lib/Drupal/Core/Cache/Context/RequestFormatCacheContext.php Defines the RequestFormatCacheContext service, for "per format" caching.
RequestStackCacheContextBase core/lib/Drupal/Core/Cache/Context/RequestStackCacheContextBase.php Defines a base class for cache contexts depending only on the request stack.
RouteCacheContext core/lib/Drupal/Core/Cache/Context/RouteCacheContext.php Defines the RouteCacheContext service, for "per route" caching.
RouteNameCacheContext core/lib/Drupal/Core/Cache/Context/RouteNameCacheContext.php Defines the RouteCacheContext service, for "per route name" caching.
SessionCacheContext core/lib/Drupal/Core/Cache/Context/SessionCacheContext.php Defines the SessionCacheContext service, for "per session" caching.
SessionExistsCacheContext core/lib/Drupal/Core/Cache/Context/SessionExistsCacheContext.php Defines the SessionExistsCacheContext service, for "session or not" caching.
SiteCacheContext core/lib/Drupal/Core/Cache/Context/SiteCacheContext.php Defines the SiteCacheContext service, for "per site" caching.
ThemeCacheContext core/lib/Drupal/Core/Cache/Context/ThemeCacheContext.php Defines the ThemeCacheContext service, for "per theme" caching.
TimeZoneCacheContext core/lib/Drupal/Core/Cache/Context/TimeZoneCacheContext.php Defines the TimeZoneCacheContext service, for "per time zone" caching.
UrlCacheContext core/lib/Drupal/Core/Cache/Context/UrlCacheContext.php Defines the UrlCacheContext service, for "per page" caching.
UserCacheContext core/lib/Drupal/Core/Cache/Context/UserCacheContext.php Defines the UserCacheContext service, for "per user" caching.
UserCacheContextBase core/lib/Drupal/Core/Cache/Context/UserCacheContextBase.php Base class for user-based cache contexts.
UserRolesCacheContext core/lib/Drupal/Core/Cache/Context/UserRolesCacheContext.php Defines the UserRolesCacheContext service, for "per role" caching.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.