From 3828283c01a2556783716c9978fbf56f09570529 Mon Sep 17 00:00:00 2001 From: Julius Härtl Date: Wed, 2 Jan 2019 22:27:46 +0100 Subject: Add caching headers for public previews MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- apps/files_sharing/tests/Controller/PublicPreviewControllerTest.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'apps/files_sharing/tests/Controller/PublicPreviewControllerTest.php') diff --git a/apps/files_sharing/tests/Controller/PublicPreviewControllerTest.php b/apps/files_sharing/tests/Controller/PublicPreviewControllerTest.php index 27e13bc8ced..3cb38a5e388 100644 --- a/apps/files_sharing/tests/Controller/PublicPreviewControllerTest.php +++ b/apps/files_sharing/tests/Controller/PublicPreviewControllerTest.php @@ -136,6 +136,7 @@ class PublicPreviewControllerTest extends TestCase { $res = $this->controller->getPreview('token', 'file', 10, 10, true); $expected = new FileDisplayResponse($preview, Http::STATUS_OK, ['Content-Type' => 'myMime']); + $expected->cacheFor(3600 * 24); $this->assertEquals($expected, $res); } @@ -190,6 +191,7 @@ class PublicPreviewControllerTest extends TestCase { $res = $this->controller->getPreview('token', 'file', 10, 10, true); $expected = new FileDisplayResponse($preview, Http::STATUS_OK, ['Content-Type' => 'myMime']); + $expected->cacheFor(3600 * 24); $this->assertEquals($expected, $res); } } -- cgit v1.2.3