Debug-action-cache | 2025 |

The debug logs will reveal the internal logic of this process. You will be able to see:

For the ultimate debugging environment, you can test your caching logic locally using the nektos/act tool. act allows you to run GitHub Actions on your local machine, which is perfect for rapid iteration without consuming GitHub Actions minutes or polluting your repository history with test commits.

Here’s an interesting, practical guide to understanding and debugging — specifically focusing on the actions/cache step and common "cache not restored" or "cache save failed" issues. debug-action-cache

is a specialized diagnostic parameter and workflow used in modern Continuous Integration and Continuous Deployment (CI/CD) pipelines—most notably within GitHub Actions and Bazel build systems. It allows developers to inspect, troubleshoot, and optimize the cached layers of a build process when automation workflows fail or exhibit flaky behavior.

Check for "restore-keys." GitHub will try to find the closest match if an exact key isn't found. If your restore-keys The debug logs will reveal the internal logic

: You will see Cache not found for input keys: .

debug-cache: runs-on: ubuntu-latest steps: - name: Restore cache debug id: cache-restore uses: actions/cache/restore@v3 with: path: node_modules key: $ runner.os -node-$ hashFiles('package-lock.json') restore-keys: | $ runner.os -node- - name: Show cache status run: | echo "Cache hit: $ steps.cache-restore.outputs.cache-hit " if [ -d node_modules ]; then ls -la node_modules; fi Check for "restore-keys

Ensure that your path configuration uses universal glob patterns or platform-specific variables (like $ env.HOME ) to prevent the runner from caching empty directories.

Cache keys are completely scoped by branch and PR boundaries. A feature branch cannot access caches created on another isolated feature branch. However, all branches can access caches created on the repository's default branch (e.g., main or master ).

Use this UI to: