Debug-action-cache May 2026

| Symptom | Debug Log Evidence | Fix | | :--- | :--- | :--- | | Cache never restores | GET response: 404 for all keys | Check hashFiles glob pattern. Use ls before cache step to ensure file exists. | | Cache restores empty folder | Path '/cache/node_modules' does not exist | Your path is relative. Use absolute path or $ github.workspace /node_modules . | | Cache upload takes 20 minutes | Compressing 50,000 files | You are caching temporary files (e.g., __pycache__ ). Add !**/__pycache__ to exclude. | | Cache uses too much space | Cache size: 11.2GB (exceeds 10GB limit) | Split cache: One for node_modules , one for build . Use actions/cache/save conditionally. | | Random cache misses | restoreKeys: [ 'Linux-node-' ] matches Linux-node-stable | Make your restore-keys more specific, e.g., $ runner.os -node-$ github.ref - | The debug-action-cache flag is great for real-time runs. But what if the workflow succeeded three days ago and you want to see what was cached?

[debug] Checking cache for key: Linux-node-abc123 [debug] restoreKeys: [ 'Linux-node-' ] [debug] Cache service URL: https://artifactcache.actions.githubusercontent.com/... [debug] Request headers: Authorization: 'Bearer ***', Accept: 'application/json' [debug] GET response: 404 (Not Found) [debug] Trying restore key: Linux-node- [debug] GET response: 200 OK [debug] Cache found: cacheKey: 'Linux-node-def456', archiveLocation: 'https://...' [debug] Downloading 234MB archive... [debug] Extracting to /home/runner/work/repo/node_modules Suddenly, you see why the wrong cache was restored (because the exact key failed, so it fell back to a prefix). Let's simulate a broken pipeline. You have a monorepo with Python and Node.js. Your Python cache keeps restoring a 3-month-old virtual environment. Step 1: Enable Debug Mode Set ACTIONS_STEP_DEBUG=true . Run the workflow. Step 2: Analyze the Cache Restoration Logic Look for the [debug] restoreKeys line: debug-action-cache

Then, in a workflow or locally:

You can query the GitHub API directly.

The typical workflow looks like this: