diff --git a/dist/setup/index.js b/dist/setup/index.js index 1dc2f2f5e..3c26f480c 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -38975,8 +38975,9 @@ exports.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); core.setOutput('cache-hit', Boolean(cacheKey)); if (!cacheKey) { core.info(`${packageManager} cache is not found`); diff --git a/src/cache-restore.ts b/src/cache-restore.ts index d49b27fc5..ce1ecb122 100644 --- a/src/cache-restore.ts +++ b/src/cache-restore.ts @@ -38,10 +38,11 @@ export const restoreCache = async ( const primaryKey = `node-cache-${platform}-${packageManager}-${fileHash}`; core.debug(`primary key is ${primaryKey}`); + const restoreKeys = [`node-cache-${platform}-${packageManager}-`]; core.saveState(State.CachePrimaryKey, primaryKey); - const cacheKey = await cache.restoreCache([cachePath], primaryKey); + const cacheKey = await cache.restoreCache([cachePath], primaryKey, restoreKeys); core.setOutput('cache-hit', Boolean(cacheKey)); if (!cacheKey) {