From b471045eff3d5384d950f968c31821566efa0d41 Mon Sep 17 00:00:00 2001 From: fantasticit Date: Tue, 10 May 2022 11:16:49 +0800 Subject: [PATCH] fix: fix lru-cache --- packages/client/src/helpers/lru-cache.ts | 8 -------- 1 file changed, 8 deletions(-) diff --git a/packages/client/src/helpers/lru-cache.ts b/packages/client/src/helpers/lru-cache.ts index f1d50a28..06c46ea5 100644 --- a/packages/client/src/helpers/lru-cache.ts +++ b/packages/client/src/helpers/lru-cache.ts @@ -114,15 +114,9 @@ export class LRUCache { } } -const CacheMap = new Map(); - export const createKeysLocalStorageLRUCache = (storageKey, capacity) => { const lruCache = new LRUCache(capacity); - if (CacheMap.has(storageKey)) { - return CacheMap.get(setStorage); - } - const manager = { syncFromStorage() { const data = getStorage(storageKey) || []; @@ -145,7 +139,5 @@ export const createKeysLocalStorageLRUCache = (storageKey, capacity) => { }, }; - CacheMap.set(storageKey, manager); - return manager; };