21 calls to Cache::mergeContexts()

AssertPageCacheContextsAndTagsTrait::assertCacheContexts in core/modules/system/tests/src/Functional/Cache/AssertPageCacheContextsAndTagsTrait.php
Ensures that some cache contexts are present in the current response.
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.
CacheTest::testMergeCacheContexts in core/tests/Drupal/Tests/Core/Cache/CacheTest.php
@covers ::mergeContexts[[api-linebreak]]
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.
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.
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.
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'.
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().
RouterTest::testFinishResponseSubscriber in core/modules/system/tests/src/Functional/Routing/RouterTest.php
Confirms that our FinishResponseSubscriber logic works properly.
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.
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.

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