-
Notifications
You must be signed in to change notification settings - Fork 55
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
Evict old files from the cache prior to saving #270
Evict old files from the cache prior to saving #270
Conversation
d6d09c9
to
0e945d8
Compare
0e945d8
to
51af452
Compare
Thanks for the PR. I thought a bit about it. First a comment:
There is already a Nevertheless, I think a 2nd option to evict based on age makes sense to me. I have some questions:
I am suggesting the following: We could support both cases, the use case of using If you define
That way we keep the option as in ccache and just add |
Sure, but with the CI cache limited at 10Gb (this can be quickly exhausted if you're working on something like, say, LLVM) I think it makes sense to be able to trim the cache where possible.
I did - but I explicitly wanted to use the job time for this parameter which is dynamic. I also thought about using the namespace feature for this - maybe something for a future enhancement.
Just because the job time is an internal calculation - so you can't supply it as a static value.
Yes I like this suggestion - it works for my use case. I will update the PR. |
5664b2c
to
6348297
Compare
6348297
to
7a42304
Compare
👍 great! LGTM |
uses the
--evict-older-than
option to evict any files from the cache that were not used during the job run. This prevents the cache from growing indefinitely as otherwise old files from previously restored caches are never deleted.For a test I performed the following -
evictOldFiles=true
- cache Size 39MbevictOldFiles=false
- cache Size 39MbevictOldFiles=true
- cache Size 39MbevictOldFiles=false
- cache Size 78MbevictOldFiles=true
- cache Size 39Mb - Cache hits 100%evictOldFiles=false
- cache Size 78Mb - Cache hits 100%