cache icon indicating copy to clipboard operation
cache copied to clipboard

Need a way for caching to be for entire repo; not scoped to per-branch builds

Open ste00martin opened this issue 1 year ago • 7 comments

We exclusively use git tags for mobile releases, and due to the nature of tags we never gain the performance of caching because each tag is treated as a separate branch even when the tag is within the same branch.

The ask is to have an option to disable scoping caching on a per-branch basis and have the cache be for the entire shared repository - the developer would have the power to cache bust by using the cache key alone without any extra rules with this feature.

ste00martin avatar May 23 '23 22:05 ste00martin

@ste00martin I also wondered about having "global" cache. I definitely love to see it, I always saw it as kind of strange. As far as I know it had some security implications.

smil2k avatar May 24 '23 00:05 smil2k

Second that!
Almost all of my workflows triggers on push of tag, so there is no performance gain, even the most of tags belong to the same branch main Actions cache is great feature, but ref scope is just really annoying thing now.

Danand avatar Aug 02 '23 11:08 Danand

I don't understand why it was designed this way....there is a cache key.

If users wanted their caches scoped by branch, or tag, or commit hash, they would include that in the cache key.

pauldraper avatar Aug 04 '23 16:08 pauldraper

Can someone explain to me the security risk? I strictly only cache dependencies and the key is computed from the dependency information. All is deterministic. So I do not understand the security problem.

Update: I understand now: https://github.com/actions/cache/issues/79#issuecomment-552559765

stanislas avatar Nov 12 '23 21:11 stanislas