diff --git a/lib/Controller/AvatarsController.php b/lib/Controller/AvatarsController.php index 547681b9b0..ca12671254 100644 --- a/lib/Controller/AvatarsController.php +++ b/lib/Controller/AvatarsController.php @@ -104,8 +104,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); } }