extract archive index cache functionality from AsyncStorage into submodule#3232
Merged
syphar merged 1 commit intorust-lang:mainfrom Mar 8, 2026
Merged
extract archive index cache functionality from AsyncStorage into submodule#3232syphar merged 1 commit intorust-lang:mainfrom
syphar merged 1 commit intorust-lang:mainfrom
Conversation
02c9d1c to
c624f2d
Compare
GuillaumeGomez
approved these changes
Mar 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Our local archive index cache is unbounded right now, due to the fact that we have quite many crawlers, over time, all index files that we have remotely end up being locally cached, for all releases we have on docs.rs. Currently the cache is around ~450 GiB (4 mio files) on our server.
So I'm planning some changes that will help managing the local cache. This will be needed for the new infrastructure where we run multiple webserver ECS tasks, which:
An alternative would be to have a separate EBS filesystem mounted into the web containers, but that will be a network filesystem, so migth be too slow. I would rather have the webserver be resilient enough to handle its caching intelligently.
This PR is about just extracting the existing archive index cache functionality into a separate struct, which we can easier reason about & unit-tests. I also directly added some of these tests. The changes from #3229 are included here, but I kept them separate so we could merge & deploy #3229 while still discussing this PR.