From 585a2320214092c2e4fd90101d088811a28f46c5 Mon Sep 17 00:00:00 2001 From: Shiba <44804845+DeepDoge@users.noreply.github.com> Date: Tue, 11 Jan 2022 22:29:28 +0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=8D=98=20changed=20cache=20time=20for=20l?= =?UTF-8?q?brypathnames?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/yt/urlCache.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/yt/urlCache.ts b/src/common/yt/urlCache.ts index 2e360c1..b3a21f2 100644 --- a/src/common/yt/urlCache.ts +++ b/src/common/yt/urlCache.ts @@ -52,7 +52,7 @@ async function put(url: string | null, id: string): Promise { return await new Promise((resolve, reject) => { const store = db?.transaction("store", "readwrite").objectStore("store") if (!store) return resolve() - const request = store.put({ value: url, expireAt: new Date(Date.now() + 24 * 60 * 60 * 1000) }, id) + const request = store.put({ value: url, expireAt: !url ? new Date(Date.now() + 1 * 60 * 60 * 1000) : new Date(Date.now() + 15 * 24 * 60 * 60 * 1000) }, id) request.addEventListener('success', () => resolve()) request.addEventListener('error', () => reject(request.error)) })