Skip to content

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

Open

Description

@ste00martin

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.

Activity

  1. changed the title [-]No way to turn off caching based on branch[/-] [+]No way to turn off caching scope based on branch[/+] on May 23, 2023
  2. changed the title [-]No way to turn off caching scope based on branch[/-] [+]Need a way for caching to be for entire repo; not scoped to per-branch builds[/+] on May 23, 2023
  3. smil2k commented on May 24, 2023

    @smil2k

    @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.

  4. rei-koshka commented on Aug 2, 2023

    @rei-koshka

    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.

  5. pauldraper commented on Aug 4, 2023

    @pauldraper

    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.

  6. stanislas commented on Nov 12, 2023

    @stanislas

    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: #79 (comment)

  7. github-actions commented on May 31, 2024

    @github-actions

    This issue is stale because it has been open for 200 days with no activity. Leave a comment to avoid closing this issue in 5 days.

  8. mjperrone commented on May 31, 2024

    @mjperrone

    I am still interested in support for something like this.

  9. cgrente commented on Aug 7, 2024

    @cgrente

    still interested by the support of cache between tags

  10. grzegorzkrukowski commented on Feb 14, 2025

    @grzegorzkrukowski

    I am also looking forward to having a global cache not scoped per branch as we mostly run in releases/ branches and it never hits any branch as we never have a release from a master branch

  11. mrousavy commented on Feb 14, 2025

    @mrousavy

    Wait... is there really no way to use caches between branches?

    I'm trying to cache build results of a 50min long C++ build that is triggered by a GitHub release - but since every GitHub release is tied to a different tag (which is a different branch), the entire build cache cannot be used anymore?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions