diff options
author | Carl Schwan <carl@carlschwan.eu> | 2022-02-17 16:58:35 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-17 16:58:35 +0100 |
commit | ac4978e715862ec9e86150b1171296629eebeced (patch) | |
tree | dfb1705f6687f501c2c6e1cd69680410e94db81e /apps/theming | |
parent | 098dfe15c1e932a2acc8bb4853979040339a3ad7 (diff) | |
parent | 7dddbd0c355d1b4761466f9f86b30aed8b112ba1 (diff) | |
download | nextcloud-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 'apps/theming')
-rw-r--r-- | apps/theming/lib/Controller/IconController.php | 2 | ||||
-rw-r--r-- | apps/theming/tests/Controller/IconControllerTest.php | 2 |
2 files changed, 2 insertions, 2 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; } diff --git a/apps/theming/tests/Controller/IconControllerTest.php b/apps/theming/tests/Controller/IconControllerTest.php index 04954782168..470709a3fab 100644 --- a/apps/theming/tests/Controller/IconControllerTest.php +++ b/apps/theming/tests/Controller/IconControllerTest.php @@ -104,7 +104,7 @@ class IconControllerTest extends TestCase { ->with('icon-core-filetypes_folder.svg') ->willReturn($file); $expected = new FileDisplayResponse($file, Http::STATUS_OK, ['Content-Type' => 'image/svg+xml']); - $expected->cacheFor(86400); + $expected->cacheFor(86400, false, true); $this->assertEquals($expected, $this->iconController->getThemedIcon('core', 'filetypes/folder.svg')); } |