diff --git a/__tests__/cache-restore.test.ts b/__tests__/cache-restore.test.ts index df9170ad2..59135452c 100644 --- a/__tests__/cache-restore.test.ts +++ b/__tests__/cache-restore.test.ts @@ -135,7 +135,7 @@ describe('cache-restore', () => { await restoreCache(packageManager); expect(hashFilesSpy).toHaveBeenCalled(); expect(infoSpy).toHaveBeenCalledWith( - `Cache restored from key: node-cache-${platform}-${packageManager}-${fileHash}` + `Cache restored from key: node-cache-${platform}-${packageManager}-v2-${fileHash}` ); expect(infoSpy).not.toHaveBeenCalledWith( `${packageManager} cache is not found` diff --git a/dist/setup/index.js b/dist/setup/index.js index c6d970eaa..eae17a848 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -71152,7 +71152,7 @@ const restoreCache = (packageManager, cacheDependencyPath) => __awaiter(void 0, if (!fileHash) { throw new Error('Some specified paths were not resolved, unable to cache dependencies.'); } - const primaryKey = `node-cache-${platform}-${packageManager}-${fileHash}`; + const primaryKey = `node-cache-${platform}-${packageManager}-v2-${fileHash}`; core.debug(`primary key is ${primaryKey}`); core.saveState(constants_1.State.CachePrimaryKey, primaryKey); const cacheKey = yield cache.restoreCache([cachePath], primaryKey); diff --git a/src/cache-restore.ts b/src/cache-restore.ts index c7317270e..5a1daca58 100644 --- a/src/cache-restore.ts +++ b/src/cache-restore.ts @@ -37,7 +37,7 @@ export const restoreCache = async ( ); } - const primaryKey = `node-cache-${platform}-${packageManager}-${fileHash}`; + const primaryKey = `node-cache-${platform}-${packageManager}-v2-${fileHash}`; core.debug(`primary key is ${primaryKey}`); core.saveState(State.CachePrimaryKey, primaryKey);