3
0
Fork 0
mirror of https://github.com/Swatinem/rust-cache synced 2025-11-07 07:56:04 +00:00

add ability to version caches

This commit is contained in:
Arpad Borsos 2020-09-28 12:00:58 +02:00
parent cfcc373039
commit 1304a2ec8d
2 changed files with 11 additions and 7 deletions

View file

@ -19,7 +19,7 @@ async function run() {
if (registryName) {
// save the index based on its revision
const indexRef = await getIndexRef(registryName);
caches.index.key = `registry-index-${indexRef}`;
caches.index.key += indexRef;
await io.rmRF(path.join(paths.index, registryName, ".cache"));
await pruneRegistryCache(registryName, packages);