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

Allow cache key prefix #32

Open
TheSharpieOne opened this issue Jun 11, 2020 · 1 comment
Open

Allow cache key prefix #32

TheSharpieOne opened this issue Jun 11, 2020 · 1 comment

Comments

@TheSharpieOne
Copy link

It would be nice to be able to clear the cache or bust the cache is some way. Based on actions/cache#2 the only way is to just modify the cache key (such as adding -v2- to it).
Why would this be needed? Not 100% sure, but I think my yarn cache is bad. It hits the cache and restores, but yarn still fetches the packages and takes a long time. Since the cache is not updated after a hit, I would need to force a cache miss in order to fix this.

(On second thought, another option might be to replace the cache after successful install. But that seems pointless as 99% of the time if the cache it, then the cache probably will not change. Though I think things like TravisCI or CircleCI do save every run)

@jagoe
Copy link

jagoe commented Jan 30, 2021

I ran into an issue where creating the cache returns an error because "another job may be creating this cache".
Apparently the same issue might happen with the native cache action with the cause possibly being some sort of lock due to a job being canceled while trying to create the cache.
The easiest and most reliable workaround is changing the cache key.

So for me the workaround seems to be switching to the native cache action, at least for now 🤷

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

2 participants