If you suspect the cache is corrupted or causing flaky builds, perform an isolation test.
Let me know if you want me to add or change something.
Then, in a workflow or locally:
Add a step after restore to list the cached directory: debug-action-cache
# List all caches for a repo gh cache list --repo owner/repo --limit 100
Cache not found for key: ubuntu-latest-npm-d41d8cd98f00b204e9800998ecf8427e
Before diving into debugging, it is essential to understand what an action cache does. If you suspect the cache is corrupted or
If you are researching debug-action-cache in the context of monorepos and advanced build systems like Bazel, the term refers to debugging the Remote Execution and Action Cache (AC).
Most caching mechanisms use a unique key to identify the cache state. This key is typically generated using: e.g., os-node-
step before your cache step to verify the files being hashed exist and have the expected content. Immutable Keys If you are researching debug-action-cache in the context
: Once a cache is saved with a specific key, it cannot be updated. If your dependencies change but your key doesn't, you'll keep pulling old data. Branch Scoping
: To share a cache between branches, ensure the default branch has a cache that the feature branch can use. More broadly, to force a new cache to be created on every run for testing purposes, you can incorporate the github.run_id into your key:
Before diving into techniques, let’s appreciate the stakes. A misconfigured cache can:
Modify the key temporarily to force the creation of a fresh cache.