diff --git a/core/modules/block/src/Controller/BlockController.php b/core/modules/block/src/Controller/BlockController.php index 2779a9b..6200a4e 100644 --- a/core/modules/block/src/Controller/BlockController.php +++ b/core/modules/block/src/Controller/BlockController.php @@ -81,6 +81,8 @@ public function demo($theme) { ); } + $page['#cache'] = []; + return $page; } diff --git a/core/modules/config/tests/config_test/src/SchemaListenerController.php b/core/modules/config/tests/config_test/src/SchemaListenerController.php index 1a6b28c..2545645 100644 --- a/core/modules/config/tests/config_test/src/SchemaListenerController.php +++ b/core/modules/config/tests/config_test/src/SchemaListenerController.php @@ -46,6 +46,7 @@ public function test() { catch (SchemaIncompleteException $e) { return [ '#markup' => $e->getMessage(), + '#cache' => [], ]; } } diff --git a/core/modules/dynamic_page_cache/tests/dynamic_page_cache_test/src/DynamicPageCacheTestController.php b/core/modules/dynamic_page_cache/tests/dynamic_page_cache_test/src/DynamicPageCacheTestController.php index e8ebeba..7187a37 100644 --- a/core/modules/dynamic_page_cache/tests/dynamic_page_cache_test/src/DynamicPageCacheTestController.php +++ b/core/modules/dynamic_page_cache/tests/dynamic_page_cache_test/src/DynamicPageCacheTestController.php @@ -53,6 +53,7 @@ public function htmlWithoutCacheability() { return [ 'content' => [ '#markup' => 'Hello world.', + '#cache' => [], ], ]; } diff --git a/core/modules/system/tests/modules/batch_test/src/Controller/BatchTestController.php b/core/modules/system/tests/modules/batch_test/src/Controller/BatchTestController.php index 35e5bea..d83f8c1 100644 --- a/core/modules/system/tests/modules/batch_test/src/Controller/BatchTestController.php +++ b/core/modules/system/tests/modules/batch_test/src/Controller/BatchTestController.php @@ -23,6 +23,7 @@ public function testRedirect() { return array( 'success' => array( '#markup' => 'Redirection successful.', + '#cache' => [], ) ); } @@ -107,6 +108,7 @@ function testProgrammatic($value = 1) { return array( 'success' => array( '#markup' => 'Got out of a programmatic batched form.', + '#cache' => [], ) ); } diff --git a/core/modules/system/tests/modules/common_test/src/Controller/CommonTestController.php b/core/modules/system/tests/modules/common_test/src/Controller/CommonTestController.php index 383be8f..03b3208 100644 --- a/core/modules/system/tests/modules/common_test/src/Controller/CommonTestController.php +++ b/core/modules/system/tests/modules/common_test/src/Controller/CommonTestController.php @@ -56,6 +56,7 @@ public function typeLinkActiveClass() { 'set_active_class' => TRUE, ), ), + '#cache' => [], ); } diff --git a/core/modules/system/tests/modules/early_rendering_controller_test/src/EarlyRenderingTestController.php b/core/modules/system/tests/modules/early_rendering_controller_test/src/EarlyRenderingTestController.php index d560f94..3ad2ba5 100644 --- a/core/modules/system/tests/modules/early_rendering_controller_test/src/EarlyRenderingTestController.php +++ b/core/modules/system/tests/modules/early_rendering_controller_test/src/EarlyRenderingTestController.php @@ -68,6 +68,7 @@ public function renderArray() { $elements = $this->earlyRenderContent(); return $elements; }], + '#cache' => [], ]; } @@ -75,6 +76,7 @@ public function renderArrayEarly() { $render_array = $this->earlyRenderContent(); return [ '#markup' => $this->renderer->render($render_array), + '#cache' => [], ]; } diff --git a/core/modules/system/tests/modules/router_test_directory/src/TestContent.php b/core/modules/system/tests/modules/router_test_directory/src/TestContent.php index dc2caca..a4e4eb9 100644 --- a/core/modules/system/tests/modules/router_test_directory/src/TestContent.php +++ b/core/modules/system/tests/modules/router_test_directory/src/TestContent.php @@ -43,7 +43,7 @@ public static function create(ContainerInterface $container) { * Provides example content for testing route enhancers. */ public function test1() { - return ['#markup' => 'abcde']; + return ['#markup' => 'abcde', '#cache' => []]; } /** @@ -54,13 +54,13 @@ public function test1() { */ public function test11() { $account = $this->currentUser(); - return ['#markup' => $account->getUsername()]; + return ['#markup' => $account->getUsername(), '#cache' => ['context' => 'user']]; } public function testAccount(UserInterface $user) { $current_user_name = $this->currentUser()->getUsername(); $this->currentUser()->setAccount($user); - return ['#markup' => $current_user_name . ':' . $user->getUsername()]; + return ['#markup' => $current_user_name . ':' . $user->getUsername(), '#cache' => ['context' => 'user']]; } /**