From 98562c15f86169aa4180ee395d704914fd955328 Mon Sep 17 00:00:00 2001 From: Carl Schwan Date: Wed, 16 Mar 2022 18:26:01 +0100 Subject: [PATCH] Adapt cacheFor to server changes Instead of using the same name for the PicoAssetResponse cacheFor method as the OCP Response class, use a custom name.. Signed-off-by: Carl Schwan --- lib/Http/PicoAssetResponse.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Http/PicoAssetResponse.php b/lib/Http/PicoAssetResponse.php index 01c15319..8c217d4c 100644 --- a/lib/Http/PicoAssetResponse.php +++ b/lib/Http/PicoAssetResponse.php @@ -74,9 +74,9 @@ public function __construct(PicoAsset $asset, bool $enableCache = true, bool $en $this->setLastModified($asset->getLastModified()); if ($enableCache && isset($this->cacheFor[$mimeType])) { - $this->cacheFor($this->cacheFor[$mimeType], $asset->isPublicAsset()); + $this->picoCacheFor($this->cacheFor[$mimeType], $asset->isPublicAsset()); } else { - $this->cacheFor(0); + $this->picoCacheFor(0); } } @@ -102,7 +102,7 @@ public function setContentSecurityPolicy(EmptyContentSecurityPolicy $csp): self * * @return $this */ - public function cacheFor(int $cacheSeconds, bool $public = false, bool $immutable = false): self + private function picoCacheFor(int $cacheSeconds, bool $public = false, bool $immutable = false): self { if ($cacheSeconds > 0) { $pragma = $public ? 'public' : 'private';