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)) })