Cache created in feature branch not usable in the default branch (main
) #1496
Open
Description
These two sentences say the opposite:
Workflow runs can restore caches created in either the current branch or the default branch (usually
main
).
When a cache is created by a workflow run triggered on a pull request, the cache is created for the merge ref (
refs/pull/.../merge
). Because of this, the cache will have a limited scope and can only be restored by re-runs of the pull request. It cannot be restored by the base branch or other pull requests targeting that base branch.
Source: Restrictions for accessing a cache
The default branch (main
) should have access to the cache created in the feature branch that was merged into it.