50 calls to Cache::mergeContexts()
- ArgumentPluginBase::getCacheContexts in core/
modules/ views/ src/ Plugin/ views/ argument/ ArgumentPluginBase.php - 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 - BlockContentTest::getExpectedCacheContexts in core/
modules/ jsonapi/ tests/ src/ Functional/ BlockContentTest.php - BlockViewBuilder::viewMultiple in core/
modules/ block/ src/ BlockViewBuilder.php - 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.
- BookNavigationBlock::getCacheContexts in core/
modules/ book/ src/ Plugin/ Block/ BookNavigationBlock.php - 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 - @covers ::mergeContexts
- CommentResourceTestBase::getExpectedCacheContexts in core/
modules/ comment/ tests/ src/ Functional/ Rest/ CommentResourceTestBase.php - CommentTest::getExpectedCacheContexts in core/
modules/ jsonapi/ tests/ src/ Functional/ CommentTest.php - ConfigurableLanguageResourceTestBase::getExpectedCacheContexts in core/
modules/ language/ tests/ src/ Functional/ Rest/ ConfigurableLanguageResourceTestBase.php - ConfigurableLanguageTest::getExpectedCacheContexts in core/
modules/ jsonapi/ tests/ src/ Functional/ ConfigurableLanguageTest.php - ContentLanguageSettingsTest::getExpectedCacheContexts in core/
modules/ jsonapi/ tests/ src/ Functional/ ContentLanguageSettingsTest.php - 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 - EntityTestComputedFieldTest::getExpectedCacheContexts in core/
modules/ jsonapi/ tests/ src/ Functional/ EntityTestComputedFieldTest.php - EntityTestJsonInternalPropertyNormalizerTest::getExpectedCacheContexts in core/
modules/ system/ tests/ modules/ entity_test/ tests/ src/ Functional/ Rest/ EntityTestJsonInternalPropertyNormalizerTest.php - EntityTestTextItemNormalizerTest::getExpectedCacheContexts in core/
modules/ system/ tests/ modules/ entity_test/ tests/ src/ Functional/ Rest/ EntityTestTextItemNormalizerTest.php - ExposedFormPluginBase::getCacheContexts in core/
modules/ views/ src/ Plugin/ views/ exposed_form/ ExposedFormPluginBase.php - ForumBlockBase::getCacheContexts in core/
modules/ forum/ src/ Plugin/ Block/ ForumBlockBase.php - 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'.
- ModerationStateFilter::getCacheContexts in core/
modules/ content_moderation/ src/ Plugin/ views/ filter/ ModerationStateFilter.php - NodeTest::testGetIndividual in core/
modules/ jsonapi/ tests/ src/ Functional/ NodeTest.php - 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().
- 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.
- StatisticsReportsTest::testPopularContentBlock in core/
modules/ statistics/ tests/ src/ Functional/ StatisticsReportsTest.php - Tests the "popular content" block.
- 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 - TermTest::getExpectedCacheContexts in core/
modules/ jsonapi/ tests/ src/ Functional/ TermTest.php - 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 - View::addCacheMetadata in core/
modules/ views/ src/ Entity/ View.php - Fills in the cache metadata of this view.
- 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.