- Symptom
- Cache not found for input keys on a new branch although the same key existsEvery pull request starts coldCaches saved in PR runs are never reused after merge
- Cause
- A run can only restore caches from its own branch, the default branch, and for pull requests the base branch. Caches written by pull request runs are scoped to the merge ref and only reusable by reruns of that PR.
- Fix
- Populate the cache from a workflow on the default branch, for example on push to main or a schedule, so every branch can restore it.
- Apply
on: push: branches: [main] # same actions/cache step and key as the PR workflow- Affected
- GitHub Actions dependency caching, as of October 2026
- Sources
Last verified 2026-10-15 · Confirmed by 0 builders