Skip to content

Commit

Permalink
Merge pull request #92 from DeepDoge/patch-1
Browse files Browse the repository at this point in the history
Changed cache time
  • Loading branch information
kodxana authored Jan 11, 2022
2 parents 093deaa + 585a232 commit c94ec17
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 c94ec17

Please sign in to comment.