summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorCarl Schwan <carl@carlschwan.eu>2022-02-17 16:58:35 +0100
committerGitHub <noreply@github.com>2022-02-17 16:58:35 +0100
commitac4978e715862ec9e86150b1171296629eebeced (patch)
treedfb1705f6687f501c2c6e1cd69680410e94db81e /core
parent098dfe15c1e932a2acc8bb4853979040339a3ad7 (diff)
parent7dddbd0c355d1b4761466f9f86b30aed8b112ba1 (diff)
downloadnextcloud-server-ac4978e715862ec9e86150b1171296629eebeced.tar.gz
nextcloud-server-ac4978e715862ec9e86150b1171296629eebeced.zip
Merge pull request #31141 from nextcloud/fix/better-cache-policy
Improve caching policy use immutable when loading versionned assets
Diffstat (limited to 'core')
-rw-r--r--core/Controller/PreviewController.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/core/Controller/PreviewController.php b/core/Controller/PreviewController.php
index 1224ea39877..30b0a45c13d 100644
--- a/core/Controller/PreviewController.php
+++ b/core/Controller/PreviewController.php
@@ -167,8 +167,10 @@ class PreviewController extends Controller {
try {
$f = $this->preview->getPreview($node, $x, $y, !$a, $mode);
- $response = new FileDisplayResponse($f, Http::STATUS_OK, ['Content-Type' => $f->getMimeType()]);
- $response->cacheFor(3600 * 24);
+ $response = new FileDisplayResponse($f, Http::STATUS_OK, [
+ 'Content-Type' => $f->getMimeType(),
+ ]);
+ $response->cacheFor(3600 * 24, false, true);
return $response;
} catch (NotFoundException $e) {
return new DataResponse([], Http::STATUS_NOT_FOUND);