GitHub Actions cache key changes every run (never hits)
By Kaveh Alemi·Latchkey
If the cache key contains something that varies on every run, the primary key is unique each time, so the restore always misses and the save just creates one more never-reused entry.
What this error means
The cache step reports a miss on every single run, cache-hit is always false, and cache storage fills with one new entry per run.
github-actions
Cache not found for input keys: Linux-build-1719300000
(new unique key every run -> permanent miss)
Common causes
Volatile token in the key
The key includes github.run_id, github.sha, a timestamp, or similar value that is unique per run.
Hash over files that always change
hashFiles over generated or always-modified files yields a new hash each run.
How to fix it
Key only on stable inputs
Remove run_id, sha, and timestamps from the primary key.