Upd - Debug-action-cache
gh api -H "Accept: application/vnd.github+json" /repos/owner/repo/actions/caches Use code with caution. Delete a Corrupt or Outdated Cache
In the modern world of DevOps and Continuous Integration (CI), speed is a currency. Every minute saved in a build pipeline translates directly to faster feedback loops, reduced compute costs, and higher developer productivity. At the heart of this speed lies caching. However, when caching goes wrong, it creates a nightmare scenario: failed builds, stale dependencies, or the infamous "works on my machine" syndrome amplified across your CI/CD pipeline.
: The system evaluates a unique string (the primary key), often generated by hashing configuration files (e.g., package-lock.json , go.sum ).
The debug logs will reveal the internal logic of this process. You will be able to see: debug-action-cache
This public link is valid for 7 days and shares a thread, including any personal information you added. This link or copies made by others cannot be deleted. If you share with third parties, their policies apply. Can’t copy the link right now. Try again later.
You can use the API to confirm whether a cache with your expected key exists, and to check if an older cache is preventing a new one from being saved due to quota limits. Additionally, you can programmatically delete specific caches using their id with a DELETE request, which is very useful for cleaning up outdated or corrupted caches that aren't being evicted properly by the automatic policy.
Most CI platforms hide verbose caching logs by default to keep the output clean. To debug an action cache effectively, you must turn on runner diagnostic logging. gh api -H "Accept: application/vnd
key: my-cache-$ runner.os -$ github.run_id
Before we debug, we must understand the architecture. When a CI job runs, it typically starts in a fresh, ephemeral environment. Without caching, every job would re-download dependencies (npm, pip, Maven, apt), re-compile code, or re-pull Docker layers.
Most caching mechanisms use a unique key to identify the cache state. This key is typically generated using: e.g., os-node- At the heart of this speed lies caching
"debug-action-cache is a CI build cache that stores and restores action outputs keyed by inputs to speed repeat runs and aid debugging."
Force a restore + delete + save cycle to manually "reset" a corrupted state.
