stable

Clone or download

Read-only

request #12389 Users' avatar should be cachable by browser

There are no reasons to make avatar not cacheable but we have to be careful on how we do it. Aside note: there is no use of ETag there as it's the request we want to entirely avoid instead of just skipping the image part. This commit introduce a new, immutable, url for avatars based on hash of avatar content (as it's done for other static resources in Tuleap). This resource is made to never expire and should be used as much as possible. The default avatar url (without hash) is also made cachable but with a very limited cache to avoid potential cache invalidation issues. Ultimately /users/name/avatar.png should no longer be used by Tuleap code to leverage cache. This also fix request #12121 Restricted users can't see avatars of other users. Change-Id: Ib02db004963dba540150818d330d5cd070b7dfb9

Modified Files

Name
M src/common/Request/RouteCollector.php +4 −0 Go to diff View file
M src/common/User/Profile/AvatarController.php +54 −24 Go to diff View file
M src/common/User/User.class.php +19 −3 Go to diff View file
M src/common/include/URLVerification.class.php +1 −1 Go to diff View file