Search for cacheContexts

  1. Search 7.x for cacheContexts
  2. Search 9.5.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
DefaultPluginManagerTest::testGetCacheContexts function core/tests/Drupal/Tests/Core/Plugin/DefaultPluginManagerTest.php @covers ::getCacheContexts[[api-linebreak]]
DynamicMenuLinkMock::getCacheContexts function core/tests/Drupal/Tests/Core/Menu/DynamicMenuLinkMock.php
DynamicPageCacheTestController::htmlWithCacheContexts function core/modules/dynamic_page_cache/tests/dynamic_page_cache_test/src/DynamicPageCacheTestController.php A route returning a render array (with cache contexts, so cacheable).
EditorResourceTestBase::getExpectedCacheContexts function core/modules/editor/tests/src/Functional/Rest/EditorResourceTestBase.php
EntityBase::getCacheContexts function core/lib/Drupal/Core/Entity/EntityBase.php
EntityCacheTagsTestBase::getAccessCacheContextsForEntity function core/modules/system/src/Tests/Entity/EntityCacheTagsTestBase.php Returns the access cache contexts for the tested entity.
EntityCacheTagsTestBase::getAccessCacheContextsForEntity function core/modules/system/tests/src/Functional/Entity/EntityCacheTagsTestBase.php Returns the access cache contexts for the tested entity.
EntityCacheTagsTestBase::getAdditionalCacheContextsForEntity function core/modules/system/src/Tests/Entity/EntityCacheTagsTestBase.php Returns the additional (non-standard) cache contexts for the tested entity.
EntityCacheTagsTestBase::getAdditionalCacheContextsForEntity function core/modules/system/tests/src/Functional/Entity/EntityCacheTagsTestBase.php Returns the additional (non-standard) cache contexts for the tested entity.
EntityCacheTagsTestBase::getAdditionalCacheContextsForEntityListing function core/modules/system/src/Tests/Entity/EntityCacheTagsTestBase.php Returns the additional cache tags for the tested entity's listing by type.
EntityCacheTagsTestBase::getAdditionalCacheContextsForEntityListing function core/modules/system/tests/src/Functional/Entity/EntityCacheTagsTestBase.php Returns the additional cache tags for the tested entity's listing by type.
EntityField::getCacheContexts function core/modules/views/src/Plugin/views/field/EntityField.php
EntityFieldRenderer::getCacheContexts function core/modules/views/src/Entity/Render/EntityFieldRenderer.php
EntityFormDisplayResourceTestBase::getExpectedCacheContexts function core/tests/Drupal/FunctionalTests/Rest/EntityFormDisplayResourceTestBase.php
EntityListBuilderTest::testCacheContexts function core/modules/system/tests/src/Functional/Entity/EntityListBuilderTest.php Tests that the correct cache contexts are set.
EntityResourceTestBase::getExpectedCacheContexts function core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php The expected cache contexts for the GET/HEAD response of the test entity.
EntityTestHalJsonInternalPropertyNormalizerTest::getExpectedCacheContexts function core/modules/system/tests/modules/entity_test/tests/src/Functional/Hal/EntityTestHalJsonInternalPropertyNormalizerTest.php
EntityTestJsonInternalPropertyNormalizerTest::getExpectedCacheContexts function core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestJsonInternalPropertyNormalizerTest.php
EntityTestLabelHalJsonAnonTest::getExpectedCacheContexts function core/modules/system/tests/modules/entity_test/tests/src/Functional/Hal/EntityTestLabelHalJsonAnonTest.php
EntityTestLabelResourceTestBase::getExpectedCacheContexts function core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestLabelResourceTestBase.php
EntityTestMapFieldHalJsonAnonTest::getExpectedCacheContexts function core/modules/system/tests/modules/entity_test/tests/src/Functional/Hal/EntityTestMapFieldHalJsonAnonTest.php
EntityTestMapFieldResourceTestBase::getExpectedCacheContexts function core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestMapFieldResourceTestBase.php
EntityTestTextItemNormalizerTest::getExpectedCacheContexts function core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestTextItemNormalizerTest.php
EntityType::getListCacheContexts function core/lib/Drupal/Core/Entity/EntityType.php
EntityTypeInterface::getListCacheContexts function core/lib/Drupal/Core/Entity/EntityTypeInterface.php The list cache contexts associated with this entity type.
EntityUnitTest::testCacheContexts function core/tests/Drupal/Tests/Core/Entity/EntityUnitTest.php @covers ::getCacheContexts[[api-linebreak]]
@covers ::addCacheContexts[[api-linebreak]]
EntityViewDisplayResourceTestBase::getExpectedCacheContexts function core/tests/Drupal/FunctionalTests/Rest/EntityViewDisplayResourceTestBase.php
EntityWithUriCacheTagsTestBase::getDefaultCacheContexts function core/modules/system/src/Tests/Entity/EntityWithUriCacheTagsTestBase.php Gets the default cache contexts for rendered entities.
EntityWithUriCacheTagsTestBase::getDefaultCacheContexts function core/modules/system/tests/src/Functional/Entity/EntityWithUriCacheTagsTestBase.php Gets the default cache contexts for rendered entities.
ExposedFormPluginBase::getCacheContexts function core/modules/views/src/Plugin/views/exposed_form/ExposedFormPluginBase.php
FieldConfigResourceTestBase::getExpectedCacheContexts function core/modules/field/tests/src/Functional/Rest/FieldConfigResourceTestBase.php
FieldStorageConfigResourceTestBase::getExpectedCacheContexts function core/modules/field/tests/src/Functional/Rest/FieldStorageConfigResourceTestBase.php
FileHalJsonAnonTest::getExpectedCacheContexts function core/modules/file/tests/src/Functional/Hal/FileHalJsonAnonTest.php The expected cache contexts for the GET/HEAD response of the test entity.
FileResourceTestBase::getExpectedCacheContexts function core/modules/file/tests/src/Functional/Rest/FileResourceTestBase.php The expected cache contexts for the GET/HEAD response of the test entity.
FilterPluginBase::getCacheContexts function core/modules/views/src/Plugin/views/filter/FilterPluginBase.php
FilterTestCacheContexts class core/modules/filter/tests/filter_test/src/Plugin/Filter/FilterTestCacheContexts.php Provides a test filter to associate cache contexts.
FilterTestCacheContexts.php file core/modules/filter/tests/filter_test/src/Plugin/Filter/FilterTestCacheContexts.php
FilterTestCacheContexts::process function core/modules/filter/tests/filter_test/src/Plugin/Filter/FilterTestCacheContexts.php
FinishResponseSubscriber::$cacheContexts property core/lib/Drupal/Core/EventSubscriber/FinishResponseSubscriber.php The cache contexts manager service.
Fixed::getCacheContexts function core/modules/views/src/Plugin/views/argument_default/Fixed.php
ForumBlockBase::getCacheContexts function core/modules/forum/src/Plugin/Block/ForumBlockBase.php
HelpBlock::getCacheContexts function core/modules/help/src/Plugin/Block/HelpBlock.php
HelpTopicSection::getCacheContexts function core/modules/help_topics/src/Plugin/HelpSection/HelpTopicSection.php
HelpTopicTwig::getCacheContexts function core/modules/help_topics/src/HelpTopicTwig.php
InaccessibleMenuLink::getCacheContexts function core/lib/Drupal/Core/Menu/InaccessibleMenuLink.php
ItemHalJsonTestBase::getExpectedCacheContexts function core/modules/aggregator/tests/src/Functional/Hal/ItemHalJsonTestBase.php
ItemResourceTestBase::getExpectedCacheContexts function core/modules/aggregator/tests/src/Functional/Rest/ItemResourceTestBase.php
LocalActionDefault::getCacheContexts function core/lib/Drupal/Core/Menu/LocalActionDefault.php
LocalTaskDefault::getCacheContexts function core/lib/Drupal/Core/Menu/LocalTaskDefault.php
LoginLogoutMenuLink::getCacheContexts function core/modules/user/src/Plugin/Menu/LoginLogoutMenuLink.php

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