function EntityCacheTagsTestBase::getRenderCacheBackend
Same name in other branches
- 11.x core/modules/system/tests/src/Functional/Entity/EntityCacheTagsTestBase.php \Drupal\Tests\system\Functional\Entity\EntityCacheTagsTestBase::getRenderCacheBackend()
Retrieves the render cache backend as a variation cache.
This is how Drupal\Core\Render\RenderCache uses the render cache backend.
Return value
\Drupal\Core\Cache\VariationCacheInterface The render cache backend as a variation cache.
2 calls to EntityCacheTagsTestBase::getRenderCacheBackend()
- EntityCacheTagsTestBase::verifyRenderCache in core/
modules/ system/ tests/ src/ Functional/ Entity/ EntityCacheTagsTestBase.php - Verify that a given render cache entry exists, with the correct cache tags.
- ShortcutCacheTagsTest::testEntityCreation in core/
modules/ shortcut/ tests/ src/ Functional/ ShortcutCacheTagsTest.php - Tests that when creating a shortcut, the shortcut set tag is invalidated.
File
-
core/
modules/ system/ tests/ src/ Functional/ Entity/ EntityCacheTagsTestBase.php, line 666
Class
- EntityCacheTagsTestBase
- Provides helper methods for Entity cache tags tests.
Namespace
Drupal\Tests\system\Functional\EntityCode
protected function getRenderCacheBackend() {
/** @var \Drupal\Core\Cache\VariationCacheFactoryInterface $variation_cache_factory */
$variation_cache_factory = \Drupal::service('variation_cache_factory');
return $variation_cache_factory->get('render');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.