Skip to content

Commit 0df5e13

Browse files
committed
Fix caching
1 parent ce1a273 commit 0df5e13

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/cache/file.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,17 @@ import { env } from 'process'
44
import globalCacheDir from 'global-cache-dir'
55
import writeFileAtomic from 'write-file-atomic'
66

7-
// The cache is persisted to `GLOBAL_CACHE_DIR/nve/versions.json`.
7+
// The cache is persisted to `GLOBAL_CACHE_DIR/nve/versions_${VERSION}.json`.
88
export const getCacheFile = async function () {
99
const cacheDir = await globalCacheDir(CACHE_DIR)
1010
const cacheFilename = env.TEST_CACHE_FILENAME || CACHE_FILENAME
1111
return `${cacheDir}/${cacheFilename}`
1212
}
1313

1414
const CACHE_DIR = 'nve'
15-
const CACHE_FILENAME = 'versions.json'
15+
// `VERSION` number should be incremented when `all-node-versions` return value
16+
// has breaking changes.
17+
const CACHE_FILENAME = 'versions_2.json'
1618

1719
// Retrieve cache file's content
1820
export const getCacheFileContent = async function (cacheFile) {

0 commit comments

Comments
 (0)