]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix caching of the user avatar
authorCarl Schwan <carl@carlschwan.eu>
Fri, 25 Feb 2022 13:24:07 +0000 (14:24 +0100)
committerCarl Schwan <carl@carlschwan.eu>
Fri, 25 Feb 2022 13:24:07 +0000 (14:24 +0100)
Now on firefox/safari it is only refetched once a day. On Chrom{e,ium}
we keep the previous behavior of maybe refetching it more often.

This also notify the user about this behavior when they upload an avatar
picture.

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
core/Controller/AvatarController.php

index ed8d0c3cdeb5471ff7639cd9423b6b5f3be83da8..d8c9745c1392cf2695d9167e853e0527b48fac7c 100644 (file)
@@ -139,7 +139,7 @@ class AvatarController extends Controller {
                }
 
                // Cache for 1 day
-               $response->cacheFor(60 * 60 * 24);
+               $response->cacheFor(60 * 60 * 24, false, true);
                return $response;
        }