core/modules/aggregator/aggregator.routing.yml | 3 +++ .../modules/entity_test/src/Controller/EntityTestController.php | 9 +++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/core/modules/aggregator/aggregator.routing.yml b/core/modules/aggregator/aggregator.routing.yml index 2f2d553..508a5de 100644 --- a/core/modules/aggregator/aggregator.routing.yml +++ b/core/modules/aggregator/aggregator.routing.yml @@ -84,3 +84,6 @@ aggregator.page_last: _title: 'Feed aggregator' requirements: _permission: 'access news feeds' + options: + # @todo Add cacheability metadata to this response. + no_cache: TRUE diff --git a/core/modules/system/tests/modules/entity_test/src/Controller/EntityTestController.php b/core/modules/system/tests/modules/entity_test/src/Controller/EntityTestController.php index 1d6e4e8..33eb14b 100644 --- a/core/modules/system/tests/modules/entity_test/src/Controller/EntityTestController.php +++ b/core/modules/system/tests/modules/entity_test/src/Controller/EntityTestController.php @@ -105,12 +105,16 @@ public function testAdmin() { * A renderable array. */ public function listReferencingEntities($entity_reference_field_name, $referenced_entity_type, $referenced_entity_id) { + $build = [ + '#cache' => [], + ]; + // Early return if the referenced entity does not exist (or is deleted). $referenced_entity = $this->entityManager() ->getStorage($referenced_entity_type) ->load($referenced_entity_id); if ($referenced_entity === NULL) { - return array(); + return $build; } $query = $this->entityQueryFactory @@ -119,9 +123,10 @@ public function listReferencingEntities($entity_reference_field_name, $reference $entities = $this->entityManager() ->getStorage('entity_test') ->loadMultiple($query->execute()); - return $this->entityManager() + $build += $this->entityManager() ->getViewBuilder('entity_test') ->viewMultiple($entities, 'full'); + return $build; } /**