Skip to content

Commit

Permalink
🍘 changed cache time for lbrypathnames
Browse files Browse the repository at this point in the history
  • Loading branch information
DeepDoge authored Jan 11, 2022
1 parent 093deaa commit 585a232
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/common/yt/urlCache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ async function put(url: string | null, id: string): Promise<void> {
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))
})
Expand Down

0 comments on commit 585a232

Please sign in to comment.