Open
Description
Hi there,
at the moment, caching only hits if the exact same lockfile exists, but most of the time, even it the lockfile slightly changes, it is still beneficial to restore cache instead of downloading everything from scratch (most likely only ~1 dependency changed).
I would propose that, by default, cache falls back to node-cache-${platform}-${packageManager}
instead of only checking node-cache-${platform}-${packageManager}-${fileHash}
.
If this is of interest, I'm happy to provide a PR. It seems to only need a test and a one line change in https://github.com/actions/setup-node/blob/main/src/cache-restore.ts#L44
See also #304 (comment)