actions / cache

Cache dependencies and build outputs in GitHub Actions
MIT License
4.49k stars 1.2k forks source link

Cache restored but cache-hit is false #1201

Closed mark-buhagiar-scottlogic closed 1 year ago

mark-buhagiar-scottlogic commented 1 year ago

We are using caching to cache our node_modules, and then only run npm CI if that cache is not found.

This is intermittently reporting that the cache was found successfully, however the cache-hit output variable returns false which means that we end up rebuilding our cache. This ends up being quite time consuming.

Is this a known defect, or are we doing something wrong?

image