Add cache header to profile picture
-
I've noticed that the profile avatar picture from /api/v1/profile/avatar/... does not return a cache-control header. Could we add one so the browser will cache it?
I guess duration could be discussed, not sure if the url would change if picture changes. If so I guess we could choose a long cache duration.
-
What cache time do you suggest?
Imo 14 days or even 30 days is okay. -
30 days sounds good to me.
-
Currently, the URL is fixed which makes it hard to cache when avatar changes and the browser. However since the profile avatar is not a public route, we could look into having that delivered by the backend dynamically based on some hash. That might be a good idea, then we can set the cache to forever basically.