From a3e6646ad7be4e7fcea93c9a5d369f188f20e7e4 Mon Sep 17 00:00:00 2001 From: wonderlandpark Date: Sat, 29 May 2021 00:54:56 +0900 Subject: [PATCH] chore: cache decreased --- utils/Query.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/utils/Query.ts b/utils/Query.ts index 759322b..36960b5 100644 --- a/utils/Query.ts +++ b/utils/Query.ts @@ -446,7 +446,7 @@ export const get = { const json = JSON.parse(k) return await getBotList('CATEGORY', json.page, json.category) }))).map(row => serialize(row)) - , { cacheMap: new TLRU({ maxStoreSize: 50, maxAgeMs: 3000000 }) }), + , { cacheMap: new TLRU({ maxStoreSize: 50, maxAgeMs: 1000000 }) }), search: new DataLoader( async (key: string[]) => (await Promise.all(key.map(async (k: string) => { @@ -454,11 +454,11 @@ export const get = { const res = await getBotList('SEARCH', json.page, json.query) return { ...res, totalPage: Number(res.totalPage), currentPage: Number(res.currentPage) } }))).map(row => serialize(row)) - , { cacheMap: new TLRU({ maxStoreSize: 50, maxAgeMs: 3000000 }) }), + , { cacheMap: new TLRU({ maxStoreSize: 50, maxAgeMs: 1000000 }) }), votes: new DataLoader( async (pages: number[]) => (await Promise.all(pages.map(async (page: number) => await getBotList('VOTE', page)))).map(row => serialize(row)) - , { cacheMap: new TLRU({ maxStoreSize: 50, maxAgeMs: 3000000 }) }), + , { cacheMap: new TLRU({ maxStoreSize: 50, maxAgeMs: 1000000 }) }), new: new DataLoader( async (pages: number[]) => (await Promise.all(pages.map(async (page: number) => await getBotList('NEW', page)))).map(row => serialize(row))