Search for cacheContexts

  1. Search 7.x for cacheContexts
  2. Search 8.9.x for cacheContexts
  3. Search 10.3.x for cacheContexts
  4. Search 11.x for cacheContexts
  5. Other projects
Title Object type File name Summary
Access::getCacheContexts function core/modules/node/src/Plugin/views/filter/Access.php The cache contexts associated with this object.
AccessResult::getCacheContexts function core/lib/Drupal/Core/Access/AccessResult.php The cache contexts associated with this object.
AccessResult::resetCacheContexts function core/lib/Drupal/Core/Access/AccessResult.php Resets cache contexts (to the empty array).
AccessResultTest::$cacheContextsManager property core/tests/Drupal/Tests/Core/Access/AccessResultTest.php The cache contexts manager.
AccessResultTest::testCacheContexts function core/tests/Drupal/Tests/Core/Access/AccessResultTest.php @covers ::addCacheContexts
@covers ::resetCacheContexts
@covers ::getCacheContexts
@covers ::cachePerPermissions
@covers ::cachePerUser
@covers ::allowedIfHasPermission
ArgumentPluginBase::getCacheContexts function core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php The cache contexts associated with this object.
AssertPageCacheContextsAndTagsTrait trait core/modules/system/tests/src/Functional/Cache/AssertPageCacheContextsAndTagsTrait.php Provides test assertions for testing page-level cache contexts & tags.
AssertPageCacheContextsAndTagsTrait.php file core/modules/system/tests/src/Functional/Cache/AssertPageCacheContextsAndTagsTrait.php
AssertPageCacheContextsAndTagsTrait::assertCacheContext function core/modules/system/tests/src/Functional/Cache/AssertPageCacheContextsAndTagsTrait.php Asserts whether an expected cache context was present in the last response.
AssertPageCacheContextsAndTagsTrait::assertCacheContexts function core/modules/system/tests/src/Functional/Cache/AssertPageCacheContextsAndTagsTrait.php Ensures that some cache contexts are present in the current response.
AssertPageCacheContextsAndTagsTrait::assertCacheMaxAge function core/modules/system/tests/src/Functional/Cache/AssertPageCacheContextsAndTagsTrait.php Asserts the max age header.
AssertPageCacheContextsAndTagsTrait::assertCacheTags function core/modules/system/tests/src/Functional/Cache/AssertPageCacheContextsAndTagsTrait.php Ensures that some cache tags are present in the current response.
AssertPageCacheContextsAndTagsTrait::assertNoCacheContext function core/modules/system/tests/src/Functional/Cache/AssertPageCacheContextsAndTagsTrait.php Asserts that a cache context was not present in the last response.
AssertPageCacheContextsAndTagsTrait::assertPageCacheContextsAndTags function core/modules/system/tests/src/Functional/Cache/AssertPageCacheContextsAndTagsTrait.php Asserts page cache miss, then hit for the given URL; checks cache headers.
AssertPageCacheContextsAndTagsTrait::enablePageCaching function core/modules/system/tests/src/Functional/Cache/AssertPageCacheContextsAndTagsTrait.php Enables page caching.
AssertPageCacheContextsAndTagsTrait::getCacheHeaderValues function core/modules/system/tests/src/Functional/Cache/AssertPageCacheContextsAndTagsTrait.php Gets a specific header value as array.
BaseFieldOverrideResourceTestBase::getExpectedCacheContexts function core/tests/Drupal/FunctionalTests/Rest/BaseFieldOverrideResourceTestBase.php The expected cache contexts for the GET/HEAD response of the test entity.
BlockContentCacheTagsTest::getAccessCacheContextsForEntity function core/modules/block_content/tests/src/Functional/BlockContentCacheTagsTest.php
BlockContentHalJsonAnonTest::getExpectedCacheContexts function core/modules/hal/tests/src/Functional/block_content/BlockContentHalJsonAnonTest.php The expected cache contexts for the GET/HEAD response of the test entity.
BlockContentResourceTestBase::getExpectedCacheContexts function core/modules/block_content/tests/src/Functional/Rest/BlockContentResourceTestBase.php The expected cache contexts for the GET/HEAD response of the test entity.
BlockContentTest::getExpectedCacheContexts function core/modules/jsonapi/tests/src/Functional/BlockContentTest.php The expected cache contexts for the GET/HEAD response of the test entity.
BlockContentTranslationUITest::$defaultCacheContexts property core/modules/block_content/tests/src/Functional/BlockContentTranslationUITest.php Default cache contexts expected on a non-translated entity.
BlockResourceTestBase::getExpectedCacheContexts function core/modules/block/tests/src/Functional/Rest/BlockResourceTestBase.php The expected cache contexts for the GET/HEAD response of the test entity.
BlockTest::getExpectedCacheContexts function core/modules/jsonapi/tests/src/Functional/BlockTest.php The expected cache contexts for the GET/HEAD response of the test entity.
BookNavigationBlock::getCacheContexts function core/modules/book/src/Plugin/Block/BookNavigationBlock.php
BreadcrumbFrontCacheContextsTest class core/modules/system/tests/src/Functional/Menu/BreadcrumbFrontCacheContextsTest.php Tests breadcrumbs functionality.
BreadcrumbFrontCacheContextsTest.php file core/modules/system/tests/src/Functional/Menu/BreadcrumbFrontCacheContextsTest.php
BreadcrumbFrontCacheContextsTest::$defaultTheme property core/modules/system/tests/src/Functional/Menu/BreadcrumbFrontCacheContextsTest.php The theme to install as the default for testing.
BreadcrumbFrontCacheContextsTest::$modules property core/modules/system/tests/src/Functional/Menu/BreadcrumbFrontCacheContextsTest.php Modules to enable.
BreadcrumbFrontCacheContextsTest::$nodeWithAlias property core/modules/system/tests/src/Functional/Menu/BreadcrumbFrontCacheContextsTest.php A test node with path alias.
BreadcrumbFrontCacheContextsTest::setUp function core/modules/system/tests/src/Functional/Menu/BreadcrumbFrontCacheContextsTest.php
BreadcrumbFrontCacheContextsTest::testBreadcrumbsFrontPageCache function core/modules/system/tests/src/Functional/Menu/BreadcrumbFrontCacheContextsTest.php Validate that breadcrumb markup get the right cache contexts.
BulkForm::getCacheContexts function core/modules/views/src/Plugin/views/field/BulkForm.php The cache contexts associated with this object.
CacheableDependencyInterface::getCacheContexts function core/lib/Drupal/Core/Cache/CacheableDependencyInterface.php The cache contexts associated with this object.
CacheableDependencyTrait::$cacheContexts property core/lib/Drupal/Core/Cache/CacheableDependencyTrait.php Cache contexts.
CacheableDependencyTrait::getCacheContexts function core/lib/Drupal/Core/Cache/CacheableDependencyTrait.php
CacheableMetadata::getCacheContexts function core/lib/Drupal/Core/Cache/CacheableMetadata.php The cache contexts associated with this object.
CacheableMetadata::setCacheContexts function core/lib/Drupal/Core/Cache/CacheableMetadata.php Sets cache contexts.
CacheableMetadataCalculationTest::getCacheContexts function core/modules/views/tests/modules/views_test_cacheable_metadata_calculation/src/Plugin/views/access/CacheableMetadataCalculationTest.php The cache contexts associated with this object.
CacheContextsManager class core/lib/Drupal/Core/Cache/Context/CacheContextsManager.php Converts cache context tokens into cache keys.
CacheContextsManager.php file core/lib/Drupal/Core/Cache/Context/CacheContextsManager.php
CacheContextsManager::$container property core/lib/Drupal/Core/Cache/Context/CacheContextsManager.php The service container.
CacheContextsManager::$contexts property core/lib/Drupal/Core/Cache/Context/CacheContextsManager.php Available cache context IDs and corresponding labels.
CacheContextsManager::$validContextTokens property core/lib/Drupal/Core/Cache/Context/CacheContextsManager.php The set of valid context tokens.
CacheContextsManager::assertValidTokens function core/lib/Drupal/Core/Cache/Context/CacheContextsManager.php Asserts the context tokens are valid.
CacheContextsManager::convertTokensToKeys function core/lib/Drupal/Core/Cache/Context/CacheContextsManager.php Converts cache context tokens to cache keys.
CacheContextsManager::getAll function core/lib/Drupal/Core/Cache/Context/CacheContextsManager.php Provides an array of available cache contexts.
CacheContextsManager::getLabels function core/lib/Drupal/Core/Cache/Context/CacheContextsManager.php Provides an array of available cache context labels.
CacheContextsManager::getService function core/lib/Drupal/Core/Cache/Context/CacheContextsManager.php Retrieves a cache context service from the container.
CacheContextsManager::optimizeTokens function core/lib/Drupal/Core/Cache/Context/CacheContextsManager.php Optimizes cache context tokens (the minimal representative subset).

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