The issue template said
Issues should only be opened on if the issue relates to code in this repository.
which I don't think is the case here. But it's still relevant and I don't know where else to file this.
I think caches should be accessible repository-wide, instead of being tied to a specific branch. The primary use case is caching external dependencies which can be shared between branches. If branch-specific caches are required one could include ${{ github.ref }} in the cache key (if slashes were handled properly that is, see #43).
I 馃憤 this. The majority of our runs don't get a cache hit due to this making actions/cache mostly useless. I also think this should be mentioned in the README and Marketplace. I was pretty confused as to why none of my branches would get a cache hit despite the cache key being the same across runs.
In some way the branch specific cache is a feature that could be nice. One way to make this work could be to also "merge" the cache. When a PR is merged into a branch, then the branch should have the cache of the PR available. This would lead to correctly shared caches naturally, from what I can tell.
This issue overlaps with the discussion here: https://github.com/actions/cache/issues/79
Linking to that thread that has a nice solution (for my use-case, at least) for future explorers trying to debug cache-misses.
Most helpful comment
I 馃憤 this. The majority of our runs don't get a cache hit due to this making
actions/cachemostly useless. I also think this should be mentioned in the README and Marketplace. I was pretty confused as to why none of my branches would get a cache hit despite the cache key being the same across runs.