diff --git a/lib/Controller/AvatarsController.php b/lib/Controller/AvatarsController.php index 6acba4ce0b..f9e3ae2839 100644 --- a/lib/Controller/AvatarsController.php +++ b/lib/Controller/AvatarsController.php @@ -108,8 +108,7 @@ public function image(string $email): Response { private function noAvatarFoundResponse(): Response { $response = new Response(); $response->setStatus(Http::STATUS_NOT_FOUND); - // Clear cache - $response->cacheFor(0); + $response->cacheFor(60 * 60, false, true); return $response; } } diff --git a/tests/Unit/Controller/AvatarControllerTest.php b/tests/Unit/Controller/AvatarControllerTest.php index f3562a6c0e..076bbccf2f 100644 --- a/tests/Unit/Controller/AvatarControllerTest.php +++ b/tests/Unit/Controller/AvatarControllerTest.php @@ -107,7 +107,7 @@ public function testGetImageNotFound() { $expected = new Response(); $expected->setStatus(Http::STATUS_NOT_FOUND); - $expected->cacheFor(0); + $expected->cacheFor(60 * 60, false, true); $this->assertEquals($expected, $resp); } }