-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Caching fallback if there is no exact hit #328
Labels
feature request
New feature or request to improve the current logic
Comments
Closed
5 tasks
nigelzor
added a commit
to thrivehealth/setup-node
that referenced
this issue
Dec 8, 2021
it's a lot faster to start from a 90% correct cache than an empty one re: actions#286 re: actions#323 re: actions#328
There seem to be implementations for this in #323 and thrivehealth@bd6483a |
Just for sharing some workarounds with |
New PR to fix this: #702 |
nigelzor
added a commit
to thrivehealth/setup-node
that referenced
this issue
Feb 28, 2023
it's a lot faster to start from a 90% correct cache than an empty one re: actions#286 re: actions#323 re: actions#328
deining
pushed a commit
to deining/setup-node
that referenced
this issue
Nov 9, 2023
Bumps [prettier](https://github.com/prettier/prettier) from 2.4.1 to 2.5.0. - [Release notes](https://github.com/prettier/prettier/releases) - [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md) - [Commits](prettier/prettier@2.4.1...2.5.0) --- updated-dependencies: - dependency-name: prettier dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 checkingnode-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)
The text was updated successfully, but these errors were encountered: