protected function AssertPageCacheContextsAndTagsTrait::enablePageCaching in Drupal 10
Same name and namespace in other branches
- 8 core/modules/system/tests/src/Functional/Cache/AssertPageCacheContextsAndTagsTrait.php \Drupal\Tests\system\Functional\Cache\AssertPageCacheContextsAndTagsTrait::enablePageCaching()
- 9 core/modules/system/tests/src/Functional/Cache/AssertPageCacheContextsAndTagsTrait.php \Drupal\Tests\system\Functional\Cache\AssertPageCacheContextsAndTagsTrait::enablePageCaching()
Enables page caching.
File
- core/
modules/ system/ tests/ src/ Functional/ Cache/ AssertPageCacheContextsAndTagsTrait.php, line 18
Class
- AssertPageCacheContextsAndTagsTrait
- Provides test assertions for testing page-level cache contexts & tags.
Namespace
Drupal\Tests\system\Functional\CacheCode
protected function enablePageCaching() {
$config = $this
->config('system.performance');
$config
->set('cache.page.max_age', 300);
$config
->save();
}