diff options
-rw-r--r-- | core/Controller/ReferenceController.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/core/Controller/ReferenceController.php b/core/Controller/ReferenceController.php index 2f6ef152d01..591d84f3e7c 100644 --- a/core/Controller/ReferenceController.php +++ b/core/Controller/ReferenceController.php @@ -59,9 +59,11 @@ class ReferenceController extends Controller { $appData = $this->appDataFactory->get('core'); $folder = $appData->getFolder('opengraph'); $file = $folder->getFile($referenceId); - return new DataDownloadResponse($file->getContent(), $referenceId, $reference->getImageContentType()); + $response = new DataDownloadResponse($file->getContent(), $referenceId, $reference->getImageContentType()); } catch (NotFoundException|NotPermittedException $e) { - return new DataResponse('', Http::STATUS_NOT_FOUND); + $response = new DataResponse('', Http::STATUS_NOT_FOUND); } + $response->cacheFor(3600, false, true); + return $response; } } |