add staleTime to transient book queries to avoid unnecessary refreshes

This commit is contained in:
Gauthier Roebroeck 2026-03-13 16:16:09 +08:00
parent 86ac3d09ac
commit dccabd5265

View file

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