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
parent
commit
ccd70a4099
No known key found for this signature in database GPG Key ID: 4C614C6ED2CDE6DF
  1. 2
      core/Controller/SvgController.php

2
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());

Loading…
Cancel
Save