Discussion about the ways to cache “ccache” outputs #235
jianmingyong
started this conversation in
General
Replies: 1 comment
-
I have made my own over-engineered variant of ccache action: https://github.com/jianmingyong/ccache-action Similar to what this action could do but only keep one copy of cache per matrix. This is not essential to any small repository. However if you are expecting a large amount of PR or commits, then this might help cap the size to a certain extent. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
There are quite a lot of concerns about ccache using a lot of space if you have a large code base expecting PR with a few matrix.
You can limit the amount of cache per matrix per branch through various means:
Set a lower max cache size. Still depending on the number of PR, you are still going to hit 10 GB regardless.
Use no timestamp key. This variant only allows you to have one cache that is not writable after each use. You have to wait for 7 days of inactivity for it to purge itself.
Using timestamp. This variant create a new cache every commit flooding your cache space. You would rely on GH to evict old cache though the cache it evict might not be ccache.
As far as what people thought this action do, it will keep only one copy of cache per branch per key. That is not how GH cache works.
I understand the rationale for relying on GH to purge unused cache automatically. Though people do not know if it will do the job the way they expected.
Whatever the concern about the size, there is no deterministic way of knowing which cache will be kept, which will be purged. This is where things get dicey.
So what do you think is the best way to handle ccache? (ccache isn’t designed in a way that it would be used in CI like this so people are worried about having so many unique cache even if they are exactly the same)
Beta Was this translation helpful? Give feedback.
All reactions