51 calls to Cache::mergeContexts()
- ArgumentPluginBase::getCacheContexts in core/
modules/ views/ src/ Plugin/ views/ argument/ ArgumentPluginBase.php  - The cache contexts associated with this object.
 - AssertPageCacheContextsAndTagsTrait::assertCacheContexts in core/
modules/ system/ tests/ src/ Functional/ Cache/ AssertPageCacheContextsAndTagsTrait.php  - Ensures that some cache contexts are present in the current response.
 - AssertViewsCacheTagsTrait::assertViewsCacheTags in core/
modules/ views/ src/ Tests/ AssertViewsCacheTagsTrait.php  - Asserts a view's result & render cache items' cache tags.
 - AssertViewsCacheTagsTrait::assertViewsCacheTagsFromStaticRenderArray in core/
modules/ views/ src/ Tests/ AssertViewsCacheTagsTrait.php  - Asserts a view's result & render cache items' cache tags.
 - BlockContentResourceTestBase::getExpectedCacheContexts in 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 in core/
modules/ jsonapi/ tests/ src/ Functional/ BlockContentTest.php  - The expected cache contexts for the GET/HEAD response of the test entity.
 - BlockViewBuilder::viewMultiple in core/
modules/ block/ src/ BlockViewBuilder.php  - Builds the render array for the provided entities.
 - BlockViewBuilderTest::assertBlockRenderedWithExpectedCacheability in core/
modules/ block/ tests/ src/ Kernel/ BlockViewBuilderTest.php  - Asserts that a block is built/rendered/cached with expected cacheability.
 - BlockViewBuilderTest::testBlockViewBuilderBuildAlter in core/
modules/ block/ tests/ src/ Kernel/ BlockViewBuilderTest.php  - Tests block build altering.
 - CacheableMetadata::merge in core/
lib/ Drupal/ Core/ Cache/ CacheableMetadata.php  - Merges the values of another CacheableMetadata object with this one.
 - CacheTagTest::getRenderCache in core/
modules/ views/ tests/ src/ Functional/ Plugin/ CacheTagTest.php  - Gets the render cache for a given view.
 - CacheTest::testMergeCacheContexts in core/
tests/ Drupal/ Tests/ Core/ Cache/ CacheTest.php  - Tests merge cache contexts.
 - CommentResourceTestBase::getExpectedCacheContexts in core/
modules/ comment/ tests/ src/ Functional/ Rest/ CommentResourceTestBase.php  - The expected cache contexts for the GET/HEAD response of the test entity.
 - CommentTest::getExpectedCacheContexts in core/
modules/ jsonapi/ tests/ src/ Functional/ CommentTest.php  - The expected cache contexts for the GET/HEAD response of the test entity.
 - ConfigurableLanguageResourceTestBase::getExpectedCacheContexts in core/
modules/ language/ tests/ src/ Functional/ Rest/ ConfigurableLanguageResourceTestBase.php  - The expected cache contexts for the GET/HEAD response of the test entity.
 - ConfigurableLanguageTest::getExpectedCacheContexts in core/
modules/ jsonapi/ tests/ src/ Functional/ ConfigurableLanguageTest.php  - The expected cache contexts for the GET/HEAD response of the test entity.
 - ContentLanguageSettingsTest::getExpectedCacheContexts in core/
modules/ jsonapi/ tests/ src/ Functional/ ContentLanguageSettingsTest.php  - The expected cache contexts for the GET/HEAD response of the test entity.
 - ContentTranslationUITestBase::doTestBasicTranslation in core/
modules/ content_translation/ tests/ src/ Functional/ ContentTranslationUITestBase.php  - Tests the basic translation workflow.
 - ContextAwarePluginTrait::getCacheContexts in core/
lib/ Drupal/ Core/ Plugin/ ContextAwarePluginTrait.php  - EntityCacheTagsTestBase::testReferencedEntity in core/
modules/ system/ tests/ src/ Functional/ Entity/ EntityCacheTagsTestBase.php  - Tests cache tags presence and invalidation of the entity when referenced.
 - EntityTestComputedFieldNormalizerTest::getExpectedCacheContexts in core/
modules/ system/ tests/ modules/ entity_test/ tests/ src/ Functional/ Rest/ EntityTestComputedFieldNormalizerTest.php  - The expected cache contexts for the GET/HEAD response of the test entity.
 - EntityTestComputedFieldTest::getExpectedCacheContexts in core/
modules/ jsonapi/ tests/ src/ Functional/ EntityTestComputedFieldTest.php  - Retrieves the expected cache contexts for the response.
 - EntityTestJsonInternalPropertyNormalizerTest::getExpectedCacheContexts in core/
modules/ system/ tests/ modules/ entity_test/ tests/ src/ Functional/ Rest/ EntityTestJsonInternalPropertyNormalizerTest.php  - The expected cache contexts for the GET/HEAD response of the test entity.
 - EntityTestTextItemNormalizerTest::getExpectedCacheContexts in core/
modules/ system/ tests/ modules/ entity_test/ tests/ src/ Functional/ Rest/ EntityTestTextItemNormalizerTest.php  - The expected cache contexts for the GET/HEAD response of the test entity.
 - ExposedFormPluginBase::getCacheContexts in core/
modules/ views/ src/ Plugin/ views/ exposed_form/ ExposedFormPluginBase.php  - The cache contexts associated with this object.
 - FrontPageTest::doTestFrontPageViewCacheTags in core/
modules/ node/ tests/ src/ Functional/ Views/ FrontPageTest.php  - Tests the cache tags on the front page.
 - HelpBlock::getCacheContexts in core/
modules/ help/ src/ Plugin/ Block/ HelpBlock.php  - HtmlRenderer::renderResponse in core/
lib/ Drupal/ Core/ Render/ MainContent/ HtmlRenderer.php  - The entire HTML: takes a #type 'page' and wraps it in a #type 'html'.
 - HtmxRenderer::renderResponse in core/
lib/ Drupal/ Core/ Render/ MainContent/ HtmxRenderer.php  - We only wrap the necessary content into a full HTML document to be processed by HTMX on the frontend.
 - ModerationStateFilter::getCacheContexts in core/
modules/ content_moderation/ src/ Plugin/ views/ filter/ ModerationStateFilter.php  - The cache contexts associated with this object.
 - NodeTest::getExpectedCacheContexts in core/
modules/ jsonapi/ tests/ src/ Functional/ NodeTest.php  - The expected cache contexts for the GET/HEAD response of the test entity.
 - RefinableCacheableDependencyTrait::addCacheContexts in core/
lib/ Drupal/ Core/ Cache/ RefinableCacheableDependencyTrait.php  - Renderer::doRender in core/
lib/ Drupal/ Core/ Render/ Renderer.php  - See the docs for ::render().
 - Renderer::doRenderRoot in core/
lib/ Drupal/ Core/ Render/ Renderer.php  - See the docs for ::render().
 - ResourceResponseTestTrait::getEmptyCollectionResponse in core/
modules/ jsonapi/ tests/ src/ Functional/ ResourceResponseTestTrait.php  - Gets a generic empty collection response.
 - ResourceTestBase::getExpectedCacheContexts in core/
modules/ jsonapi/ tests/ src/ Functional/ ResourceTestBase.php  - The expected cache contexts for the GET/HEAD response of the test entity.
 - ResourceTestBase::getExpectedCollectionCacheability in core/
modules/ jsonapi/ tests/ src/ Functional/ ResourceTestBase.php  - Computes the cacheability for a given entity collection.
 - ResourceTestBase::getExpectedRelatedResponse in core/
modules/ jsonapi/ tests/ src/ Functional/ ResourceTestBase.php  - Builds an expected related ResourceResponse for the given field.
 - RouterTest::testFinishResponseSubscriber in core/
modules/ system/ tests/ src/ Functional/ Routing/ RouterTest.php  - Confirms that our FinishResponseSubscriber logic works properly.
 - SortRandomTest::testRandomOrderingWithRenderCaching in core/
modules/ views/ tests/ src/ Kernel/ Handler/ SortRandomTest.php  - Tests random ordering with tags based caching.
 - StyleSerializerEntityTest::testRestRenderCaching in core/
modules/ rest/ tests/ src/ Functional/ Views/ StyleSerializerEntityTest.php  - Tests REST export with views render caching enabled.
 - SystemMenuBlock::getCacheContexts in core/
modules/ system/ src/ Plugin/ Block/ SystemMenuBlock.php  - TermResourceTestBase::getExpectedCacheContexts in core/
modules/ taxonomy/ tests/ src/ Functional/ Rest/ TermResourceTestBase.php  - The expected cache contexts for the GET/HEAD response of the test entity.
 - TermTest::getExpectedCacheContexts in core/
modules/ jsonapi/ tests/ src/ Functional/ TermTest.php  - The expected cache contexts for the GET/HEAD response of the test entity.
 - ToolbarCacheContextsTest::assertToolbarCacheContexts in core/
modules/ toolbar/ tests/ src/ Functional/ ToolbarCacheContextsTest.php  - Tests that cache contexts are applied for both users.
 - UrlTest::testLinkBubbleableMetadata in core/
modules/ system/ tests/ src/ Kernel/ Common/ UrlTest.php  - Tests that #type=link bubbles outbound route/path processors' metadata.
 - UserTest::getExpectedCacheContexts in core/
modules/ jsonapi/ tests/ src/ Functional/ UserTest.php  - The expected cache contexts for the GET/HEAD response of the test entity.
 - View::addCacheMetadata in core/
modules/ views/ src/ Entity/ View.php  - Fills in the cache metadata of this view.
 - ViewsBlockBase::getCacheContexts in core/
modules/ views/ src/ Plugin/ Block/ ViewsBlockBase.php  - ViewsBlockTest::testCacheableMetadata in core/
modules/ views/ tests/ src/ Unit/ Plugin/ Block/ ViewsBlockTest.php  - Tests that cacheable metadata is retrieved from the view and merged with block cacheable metadata.
 - ViewsExposedFilterBlock::getCacheContexts in core/
modules/ views/ src/ Plugin/ Block/ ViewsExposedFilterBlock.php  
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.