Search for cacheContexts

  1. Search 7.x for cacheContexts
  2. Search 9.5.x for cacheContexts
  3. Search 8.9.x for cacheContexts
  4. Search 10.3.x for cacheContexts
  5. Other projects
Title Object type File name Summary
Access::getCacheContexts function core/modules/node/src/Plugin/views/filter/Access.php
AccessPolicyBase::getPersistentCacheContexts function core/lib/Drupal/Core/Session/AccessPolicyBase.php
AccessPolicyInterface::getPersistentCacheContexts function core/lib/Drupal/Core/Session/AccessPolicyInterface.php Gets the persistent cache contexts.
AccessPolicyProcessor::getPersistentCacheContexts function core/lib/Drupal/Core/Session/AccessPolicyProcessor.php Gets the persistent cache contexts of all policies within a given scope.
AccessPolicyProcessorTest::testCacheContexts function core/tests/Drupal/Tests/Core/Session/AccessPolicyProcessorTest.php Tests that only the cache contexts for policies that apply are added.
AccessResult::getCacheContexts function core/lib/Drupal/Core/Access/AccessResult.php
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
ActionResourceTestBase::getExpectedCacheContexts function core/modules/system/tests/src/Functional/Rest/ActionResourceTestBase.php
AlwaysAddsAccessPolicy::getPersistentCacheContexts function core/tests/Drupal/Tests/Core/Session/AccessPolicyProcessorTest.php Gets the persistent cache contexts.
AlwaysAltersAccessPolicy::getPersistentCacheContexts function core/tests/Drupal/Tests/Core/Session/AccessPolicyProcessorTest.php Gets the persistent cache contexts.
ArgumentPluginBase::getCacheContexts function core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php
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.
BarAccessPolicy::getPersistentCacheContexts function core/tests/Drupal/Tests/Core/Session/AccessPolicyProcessorTest.php Gets the persistent cache contexts.
BaseFieldOverrideResourceTestBase::getExpectedCacheContexts function core/tests/Drupal/FunctionalTests/Rest/BaseFieldOverrideResourceTestBase.php
BazAccessPolicy::getPersistentCacheContexts function core/tests/Drupal/Tests/Core/Session/AccessPolicyProcessorTest.php Gets the persistent cache contexts.
BlockContentCacheTagsTest::getAccessCacheContextsForEntity function core/modules/block_content/tests/src/Functional/BlockContentCacheTagsTest.php
BlockContentResourceTestBase::getExpectedCacheContexts function core/modules/block_content/tests/src/Functional/Rest/BlockContentResourceTestBase.php
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
BlockResourceTestBase::getExpectedCacheContexts function core/modules/block/tests/src/Functional/Rest/BlockResourceTestBase.php
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
BreadcrumbFrontCacheContextsTest::$modules property core/modules/system/tests/src/Functional/Menu/BreadcrumbFrontCacheContextsTest.php
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
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.

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