use built in response cacheFor function
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
This commit is contained in:
parent
29ff7efe9a
commit
ccd70a4099
|
@ -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…
Reference in New Issue