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:
parent
cfcc373039
commit
1304a2ec8d
2 changed files with 11 additions and 7 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue