diff --git a/core/modules/rest/src/Plugin/views/display/RestExport.php b/core/modules/rest/src/Plugin/views/display/RestExport.php index 04ef341..5392e48 100644 --- a/core/modules/rest/src/Plugin/views/display/RestExport.php +++ b/core/modules/rest/src/Plugin/views/display/RestExport.php @@ -280,8 +280,8 @@ public function execute() { $header = []; $header['Content-type'] = $this->getMimeType(); - $cache_metadata = CacheableMetadata::createFromRenderArray($output); $response = new CacheableResponse($this->renderer->renderRoot($output), 200); + $cache_metadata = CacheableMetadata::createFromRenderArray($output); $response->addCacheableDependency($cache_metadata);