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 S3 key metadata to avoid unnecessary calls especially with collectstatic #1367

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

kupsum
Copy link

@kupsum kupsum commented Mar 16, 2024

Relates to #1255

When running collectstatic S3 key check first the existence and the last modification time. With this change the latter call is avoided. Previously last modification fetched the whole object and didn't use the metadata. This cause a lot of unnecessary traffic and thus making collectstatic slow.

@davidmir
Copy link

Is there any chance we can move this issue forward? :)

@jschneier
Copy link
Owner

Does this work in a multi threaded environment or does the cache need a lock?

@LeaveMyYard
Copy link

+1 for this PR, will really increase a speed of my deployment :)

@jschneier, from their docs cachetools are not thread-safe (https://cachetools.readthedocs.io/en/stable/)

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

Successfully merging this pull request may close these issues.

4 participants