mirror of
https://github.com/gotson/komga.git
synced 2026-05-07 12:01:40 +02:00
add staleTime to transient book queries to avoid unnecessary refreshes
This commit is contained in:
parent
86ac3d09ac
commit
dccabd5265
1 changed files with 4 additions and 0 deletions
|
|
@ -19,6 +19,8 @@ export const transientBooksScan = defineQueryOptions(({ path }: { path: string }
|
|||
})
|
||||
// unwrap the openapi-fetch structure on success
|
||||
.then((res) => res.data),
|
||||
// 1 hour
|
||||
staleTime: 60 * 60 * 1000,
|
||||
}))
|
||||
|
||||
export const transientBookAnalyze = defineQueryOptions(
|
||||
|
|
@ -35,5 +37,7 @@ export const transientBookAnalyze = defineQueryOptions(
|
|||
})
|
||||
// unwrap the openapi-fetch structure on success
|
||||
.then((res) => res.data),
|
||||
// 1 hour
|
||||
staleTime: 60 * 60 * 1000,
|
||||
}),
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue