|
@@ -35,7 +35,10 @@ export class DiskCache implements LimitedCache {
|
|
Error(),
|
|
Error(),
|
|
'Cache key exists but size does not match. Deleting cache key.'
|
|
'Cache key exists but size does not match. Deleting cache key.'
|
|
);
|
|
);
|
|
- unlink(cachePath);
|
|
|
|
|
|
+ unlink(cachePath).catch((e) => {
|
|
|
|
+ if (e.code === 'ENOENT') return;
|
|
|
|
+ logError(e, 'Failed to delete cache key');
|
|
|
|
+ });
|
|
return undefined;
|
|
return undefined;
|
|
}
|
|
}
|
|
DiskLRUService.touch(cachePath);
|
|
DiskLRUService.touch(cachePath);
|
|
@@ -53,7 +56,10 @@ export class DiskCache implements LimitedCache {
|
|
Error(),
|
|
Error(),
|
|
'Old cache key exists but size does not match. Deleting cache key.'
|
|
'Old cache key exists but size does not match. Deleting cache key.'
|
|
);
|
|
);
|
|
- unlink(oldCachePath);
|
|
|
|
|
|
+ unlink(oldCachePath).catch((e) => {
|
|
|
|
+ if (e.code === 'ENOENT') return;
|
|
|
|
+ logError(e, 'Failed to delete cache key');
|
|
|
|
+ });
|
|
return undefined;
|
|
return undefined;
|
|
}
|
|
}
|
|
const match = new Response(await getFileStream(oldCachePath));
|
|
const match = new Response(await getFileStream(oldCachePath));
|