Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cache for avatars #3098

Closed
PVince81 opened this issue Feb 27, 2020 · 3 comments · Fixed by #5194
Closed

Cache for avatars #3098

PVince81 opened this issue Feb 27, 2020 · 3 comments · Fixed by #5194

Comments

@PVince81
Copy link
Contributor

PVince81 commented Feb 27, 2020

Instead of loading the avatars every time, cache it at least in the scope of the current page until a page reload.

What currently happens is that when there's a list of repeated avatars (ex: collaborators in the "shared with others" list), each avatar is loading again on its own, with different timings. So they don't appear at the same time.

@pascalwengerter
Copy link
Contributor

@fschade to what extent did #5073 mitigate this issue?

@fschade
Copy link
Collaborator

fschade commented May 12, 2021

@fschade to what extent did #5073 mitigate this issue?

no, at the moment we only cache the url // presigned-url.

@kulmann
Copy link
Member

kulmann commented May 12, 2021

The browser cache can only kick in for the already known URLs. Which is for max. 60 seconds now. Since presigned URLs get invalidated pretty quick we cannot build a reasonable cache at the moment. For a single page load it is improved though, since we re-use the same presigned URL by userId. As a result, if one and the same avatar is on the current page 5 times, we only load it once and use it 4 times from the cache (native browser caching).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants