A cache entry was saved during a workflow on the repository default branch. A later workflow on a feature branch uses the same cache key. What is the expected access behavior?
Select an answer to reveal the explanation.
Short Explanation and Infographic
Default-branch caches are generally available for restore on feature branches in the same repo—great for warm CI. They are not enterprise-global, and CODEOWNERS does not gate cache keys.
Full explanation below image
Full Explanation
GitHub Actions cache access is repository-scoped with branch isolation rules designed so base/default branch caches can warm descendant work while limiting how untrusted branches poison shared caches for protected lines. In practice, feature branches commonly restore caches produced on the default branch when keys match. Caches are not enterprise-wide by key string. CODEOWNERS is a review mechanism, not a cache ACL. Still design keys with OS/runtime/lockfile hashes, use restore-keys for partial hits, and never cache secrets. Eviction and size limits mean builds must remain correct on cache miss.