diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2018-05-31 14:27:26 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2018-06-04 08:48:54 +0200 |
commit | e5cc8be9d5f8899417aa0716b8b29c596417af61 (patch) | |
tree | 6c3fad6b8b9fcdf396417b0cd2020544a01c0835 /core/Controller | |
parent | a34495933e83c4c850308e3448a16160162eb65a (diff) | |
download | nextcloud-server-e5cc8be9d5f8899417aa0716b8b29c596417af61.tar.gz nextcloud-server-e5cc8be9d5f8899417aa0716b8b29c596417af61.zip |
Fix usage
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'core/Controller')
-rw-r--r-- | core/Controller/AvatarController.php | 8 | ||||
-rw-r--r-- | core/Controller/PreviewController.php | 10 |
2 files changed, 0 insertions, 18 deletions
diff --git a/core/Controller/AvatarController.php b/core/Controller/AvatarController.php index 14709d65fed..11d81ab00b2 100644 --- a/core/Controller/AvatarController.php +++ b/core/Controller/AvatarController.php @@ -141,16 +141,8 @@ class AvatarController extends Controller { return $resp; } - // Let cache this! - $resp->addHeader('Pragma', 'public'); // Cache for 30 minutes $resp->cacheFor(1800); - - $expires = new \DateTime(); - $expires->setTimestamp($this->timeFactory->getTime()); - $expires->add(new \DateInterval('PT30M')); - $resp->addHeader('Expires', $expires->format(\DateTime::RFC1123)); - return $resp; } diff --git a/core/Controller/PreviewController.php b/core/Controller/PreviewController.php index e18487363a1..3dfc4872d01 100644 --- a/core/Controller/PreviewController.php +++ b/core/Controller/PreviewController.php @@ -174,17 +174,7 @@ 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()]); - - // Let cache this! - $response->addHeader('Pragma', 'public'); - - // Cache previews for 24H $response->cacheFor(3600 * 24); - $expires = new \DateTime(); - $expires->setTimestamp($this->timeFactory->getTime()); - $expires->add(new \DateInterval('P1D')); - $response->addHeader('Expires', $expires->format(\DateTime::RFC2822)); - return $response; } catch (NotFoundException $e) { return new DataResponse([], Http::STATUS_NOT_FOUND); |