Debug-action-cache -

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

Search the logs for: Cache restored from key: . Copy that key. debug-action-cache

[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: Combine this with debug-action-cache logs from the workflow

Then, in a workflow or locally:

But what happens when caching breaks? What happens when your cache restore takes 10 minutes, or worse, corrupts your build? Don't wait for the cache to break

A debug-action-cache log says:

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