cicd
caching
ai_generated
true
Warning: Cache not found for input keys: node-linux-x64-abc123
ID: cicd/gha-cache-miss
88%Fix Rate
90%Confidence
50Evidence
2023-01-01First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| any | active | — | — | — |
Root Cause
GitHub Actions cache action fails to restore a cache because the key does not match any existing cache entry. Leads to slower builds as dependencies must be downloaded and built from scratch.
genericWorkarounds
-
92% success Use hashFiles() on lockfiles for cache keys with fallback restore-keys
Set key to something like 'node-${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}' and add restore-keys with progressively less specific prefixes like 'node-${{ runner.os }}-' -
90% success Switch to the built-in caching in setup-node, setup-python, or similar setup actions
Use 'cache: npm' in actions/setup-node or 'cache: pip' in actions/setup-python instead of manual cache action configuration
Dead Ends
Common approaches that don't work:
-
Use an overly specific cache key that includes commit SHA
90% fail
Every commit generates a unique key, so the cache is never reused and always misses
-
Manually delete and recreate caches from the GitHub UI repeatedly
75% fail
Does not address the key generation strategy; caches will continue to miss if keys are not properly configured
Error Chain
Leads to:
Preceded by:
Frequently confused with: