Debug-action-cache May 2026

[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:

That is the difference between guessing and knowing. Happy debugging. debug-action-cache

Once set, re-run your workflow. You will see logs prefixed with [debug] inside the cache step. A normal log says: Cache restored from key: Linux-node-abc123 Let's simulate a broken pipeline

name: Cache Debug on: workflow_dispatch: inputs: debug_level: description: 'Debug level' default: 'full' type: choice options: ['full', 'basic'] Step 1: Enable Debug Mode Set ACTIONS_STEP_DEBUG=true

[debug] Resolved path: 'node_modules' -> '/home/runner/work/app/node_modules' [debug] Path exists: true [debug] Contents: [ 'react', 'lodash', '.bin' ] If you see Path exists: false , you know your working directory is wrong. Add working-directory: ./app to your step. You run a Windows runner and a Linux runner. They share the same cache key. Debug logs reveal:

Using debug-action-cache to find the exact key to delete:

Then, in a workflow or locally: