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

Option to only use exact cache hit #177

Open
Nemo157 opened this issue Nov 9, 2023 · 1 comment
Open

Option to only use exact cache hit #177

Nemo157 opened this issue Nov 9, 2023 · 1 comment

Comments

@Nemo157
Copy link

Nemo157 commented Nov 9, 2023

On docs.rs we've recently run into disk space issues in CI. Debugging it I noticed that we had a very large cache (3GB compressed), looking at the lists of files there were many duplicate versions of crates included in it. I believe the main cause was having multiple large sets of dependency updates merged within a week, so the previous versions were not being cleaned when restoring a partially-matched cache. After setting an explicit prefix-key to purge the cache it dropped down to just 1.2GB.

We don't do many frequent dependency updates, instead batching them up, so the partial cache matches aren't generally that useful for us; having the cache not carrying the extra weight for a week after the update is more important.

@Nemo157
Copy link
Author

Nemo157 commented Nov 9, 2023

Another idea I had to solve our issue was an option to not restore the cache. We could then pass a conditional expression that enabled this just for our dependency updates, so other PRs that modify versions would still use a partial cache and just the mass update PRs would flush the cache out to a new state.

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

No branches or pull requests

1 participant