Skip to content

allow replacing stale cache#163

Open
titusfortner wants to merge 1 commit into
bazel-contrib:mainfrom
titusfortner:replace_cache
Open

allow replacing stale cache#163
titusfortner wants to merge 1 commit into
bazel-contrib:mainfrom
titusfortner:replace_cache

Conversation

@titusfortner
Copy link
Copy Markdown
Contributor

Adds a new config value that deletes cache with matching prefixes before saving cache (limited to current ref).
My use case is that we only save cache from one branch, so as soon as the cache is changed we'll never need the old one, and when we are doing a lot of version bumps we're getting a lot of cache churn.

Requires actions: write permission on the workflow token. Requires cache-save: true (the default)

Separate note, if you wanted to make this work for #18 we could add a one line replacement:

  if (cacheHit === 'true') {

with

  if (cacheHit === 'true' && config.cacheReplace !== true) {

But I figured that was out of scope for my needs here.

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

Successfully merging this pull request may close these issues.

1 participant