This repository has been archived by the owner on May 22, 2024. It is now read-only.
forked from actions/setup-node
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
Showing
2 changed files
with
4 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -73046,8 +73046,9 @@ const restoreCache = (packageManager, cacheDependencyPath) => __awaiter(void 0, | |
} | ||
const primaryKey = `node-cache-${platform}-${packageManager}-${fileHash}`; | ||
core.debug(`primary key is ${primaryKey}`); | ||
const restoreKeys = [`node-cache-${platform}-${packageManager}-`]; | ||
core.saveState(constants_1.State.CachePrimaryKey, primaryKey); | ||
const cacheKey = yield cache.restoreCache([cachePath], primaryKey); | ||
const cacheKey = yield cache.restoreCache([cachePath], primaryKey, restoreKeys); | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
voxpelli
|
||
core.setOutput('cache-hit', Boolean(cacheKey)); | ||
if (!cacheKey) { | ||
core.info(`${packageManager} cache is not found`); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
👏 thanks @nigelzor -- we ran into a problem with setup-node's cache-key today, and I'm delighted to see you here.