diff --git a/api/spider.ts b/api/spider.ts index ac69b2f6..f4a23fcc 100644 --- a/api/spider.ts +++ b/api/spider.ts @@ -1,5 +1,3 @@ -import LRU from 'lru-cache' - import { fetch } from './dispatcher.js' import { MusicData, MusicCore, PlayerValue, RawAPI, RankKey, MusicTagList, genKey } from './type.js' @@ -16,10 +14,6 @@ import { SPIDER_PARALLEL } from './config.js' const waits = new Map() -const downCache = new LRU({ - maxAge: 1000 * 60 * 60 -}) - let spiders = SPIDER_PARALLEL let musicList: MusicData[] = [] @@ -43,12 +37,7 @@ const sumLock = ({ uid, difficulty, platform }: RankKey) => { } const down = async (url: string) => { - const hit = downCache.get(url) - if (hit) { - return hit as T - } const result = await fetch(url) - downCache.set(url, result) return result as T }