fix issue
This commit is contained in:
parent
9862a09786
commit
218b6214ce
1 changed files with 4 additions and 3 deletions
|
@ -53,11 +53,12 @@ class DiskLRUService {
|
|||
if (size >= maxSize) {
|
||||
const leastRecentlyUsed =
|
||||
await this.findLeastRecentlyUsed(cacheDir);
|
||||
|
||||
await unlink(leastRecentlyUsed.path).catch((e) => {
|
||||
try {
|
||||
await unlink(leastRecentlyUsed.path);
|
||||
} catch (e) {
|
||||
if (e.code === 'ENOENT') return;
|
||||
logError(e, 'Failed to evict least recently used');
|
||||
});
|
||||
}
|
||||
this.evictLeastRecentlyUsed(cacheDir, maxSize);
|
||||
}
|
||||
resolve(null);
|
||||
|
|
Loading…
Add table
Reference in a new issue