Debug-action-cache May 2026
But what happens when caching breaks? What happens when your cache restore takes 10 minutes, or worse, corrupts your build?
- name: Cache Node Modules uses: actions/cache@v4 env: CACHE_DEBUG: true with: path: node_modules key: $ runner.os -node-$ hashFiles('package-lock.json') V4 debug logs include timing metrics: debug-action-cache
Add a temporary step after your cache restore: But what happens when caching breaks
Combine this with debug-action-cache logs from the workflow run (download the raw logs). Match the cacheKey from the API with the Cache restored from key in the logs. If the last_accessed_at is older than your run, your restore key is wrong. Don't wait for the cache to break. Create a dedicated "Cache Debug" workflow in your repo ( .github/workflows/cache-debug.yml ): debug-action-cache