: With less time spent on waiting for computations or tests to complete, developers can focus more on writing code and less on waiting for results.
restore-keys: node-modules- to fall back to the latest matching cache.key: npm-v1-$ hashFiles(...) – change v1 to invalidate old caches.cache-hit output to skip saving if nothing changed.act (local GitHub Actions runner) with -v to test caching without CI.Mastering the debug-action-cache : A Guide to Troubleshooting Remote Build Execution debug-action-cache
Additional information could help me provide a more precise report. your restore key is wrong. e.g.
Mastering means treating cache failures as code failures. It means adding ls commands, hash validations, and verbose logs to your pipeline with the same rigor as unit tests. debug-action-cache
curl -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer YOUR_GITHUB_TOKEN" \ "https://api.github.com/repos/OWNER/REPO/actions/caches"
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.
e.g., "Cache restore always says Cache not found even though a previous workflow run saved it."