diff --git a/dist/setup/index.js b/dist/setup/index.js index ff4bec264..f22c64272 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -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); 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 7f761da44..6ddb59252 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) {