Browse Source
use built in response cacheFor function
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
pull/9984/head
John Molakvoæ (skjnldsv)
7 years ago
committed by
Julius Härtl
No known key found for this signature in database
GPG Key ID: 4C614C6ED2CDE6DF
1 changed files with
1 additions and
1 deletions
-
core/Controller/SvgController.php
|
|
|
@ -123,7 +123,7 @@ class SvgController extends Controller { |
|
|
|
|
|
|
|
// Set cache control
|
|
|
|
$ttl = 31536000; |
|
|
|
$response->addHeader('Cache-Control', 'max-age=' . $ttl . ', immutable'); |
|
|
|
$response->cacheFor($ttl); |
|
|
|
$response->addHeader('Content-Disposition', 'inline; filename="' . $fileName . '.svg"'); |
|
|
|
$expires = new \DateTime(); |
|
|
|
$expires->setTimestamp($this->timeFactory->getTime()); |
|
|
|
|