Debug-action-cache -
You might find that previous jobs did not clean up, and the restore step is simply finding a local folder, bypassing the remote cache entirely.
Cache save is — if two parallel jobs try to save the same key, one succeeds, the other silently skips. Debug with:
Caching is not "set and forget." It is a living part of your infrastructure. Every time a dependency changes, a runner OS updates, or a new developer joins the team, your cache assumptions can break.
Advanced Troubleshooting: Evicting and Purging Corrupted Caches debug-action-cache
The standard cache action works on three principles:
However, this "black box" efficiency fails when the hash doesn't account for a hidden dependency, such as a hardcoded local path or a fluctuating timestamp. This leads to the dreaded "it works on my machine" bug, but at scale. Core Debugging Strategies
bazel build //target --execution_log_binary_file=/tmp/exec.log Use code with caution. You might find that previous jobs did not
Are you experiencing , or is the cache loading stale/corrupted data ? Share public link
# List all caches for a repo gh cache list --repo owner/repo --limit 100
gh api --method DELETE -H "Accept: application/vnd.github+json" /repos/owner/repo/actions/caches/cache_id Use code with caution. Every time a dependency changes, a runner OS
hashFiles('package-lock.json') = d41d8cd98f00b204e9800998ecf8427e
: Helps in viewing the output of cached actions as if they were running live.
Sometimes, built-in tools are insufficient. Create a dedicated debug script in your repo: .github/scripts/debug_cache.sh