-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
dmitry-shibanov
added
the
feature request
New feature or request to improve the current logic
label
Oct 21, 2021
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: