Skip to content

Commit b67cbdb

Browse files
committed
bump cache version
1 parent 8f7008b commit b67cbdb

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

__tests__/cache-restore.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ describe('cache-restore', () => {
135135
await restoreCache(packageManager);
136136
expect(hashFilesSpy).toHaveBeenCalled();
137137
expect(infoSpy).toHaveBeenCalledWith(
138-
`Cache restored from key: node-cache-${platform}-${packageManager}-${fileHash}`
138+
`Cache restored from key: node-cache-${platform}-${packageManager}-v2-${fileHash}`
139139
);
140140
expect(infoSpy).not.toHaveBeenCalledWith(
141141
`${packageManager} cache is not found`

dist/setup/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71152,7 +71152,7 @@ const restoreCache = (packageManager, cacheDependencyPath) => __awaiter(void 0,
7115271152
if (!fileHash) {
7115371153
throw new Error('Some specified paths were not resolved, unable to cache dependencies.');
7115471154
}
71155-
const primaryKey = `node-cache-${platform}-${packageManager}-${fileHash}`;
71155+
const primaryKey = `node-cache-${platform}-${packageManager}-v2-${fileHash}`;
7115671156
core.debug(`primary key is ${primaryKey}`);
7115771157
core.saveState(constants_1.State.CachePrimaryKey, primaryKey);
7115871158
const cacheKey = yield cache.restoreCache([cachePath], primaryKey);

src/cache-restore.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import {State} from './constants';
88
import {
99
getCacheDirectoryPath,
1010
getPackageManagerInfo,
11-
getPackageManagerWorkingDir,
1211
PackageManagerInfo
1312
} from './cache-utils';
1413

@@ -37,7 +36,7 @@ export const restoreCache = async (
3736
);
3837
}
3938

40-
const primaryKey = `node-cache-${platform}-${packageManager}-${fileHash}`;
39+
const primaryKey = `node-cache-${platform}-${packageManager}-v2-${fileHash}`;
4140
core.debug(`primary key is ${primaryKey}`);
4241

4342
core.saveState(State.CachePrimaryKey, primaryKey);

0 commit comments

Comments
 (0)