Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Schwan <carl@carlschwan.eu>2022-02-12 00:14:04 +0300
committerCarl Schwan <carl@carlschwan.eu>2022-02-16 13:35:57 +0300
commit7dddbd0c355d1b4761466f9f86b30aed8b112ba1 (patch)
treeb782783ff0b88277e79a5ce3b5115f47a4b240f0 /apps/theming/lib/Controller
parentfbbbc2ec3445aa777f56c97a0a383a2e8566be54 (diff)
Improve caching policy
* Cache css with version in url. This makes most js and css requests to be cached by the browser * Force caching previews, the etag is in the url so that if the propfind gives a new etag, we will refresh it otherwise it's no use to try to fetch the new etag and do tons of DB queries Tested with firefox and 'debug' => false (important so that the js/css urls are generated with ?v= parameter) Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Diffstat (limited to 'apps/theming/lib/Controller')
-rw-r--r--apps/theming/lib/Controller/IconController.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/theming/lib/Controller/IconController.php b/apps/theming/lib/Controller/IconController.php
index 45d3ee14e47..173b5210394 100644
--- a/apps/theming/lib/Controller/IconController.php
+++ b/apps/theming/lib/Controller/IconController.php
@@ -96,7 +96,7 @@ class IconController extends Controller {
$iconFile = $this->imageManager->setCachedImage('icon-' . $app . '-' . str_replace('/', '_',$image), $icon);
}
$response = new FileDisplayResponse($iconFile, Http::STATUS_OK, ['Content-Type' => 'image/svg+xml']);
- $response->cacheFor(86400);
+ $response->cacheFor(86400, false, true);
return $response;
}