From dccabd526598805e8516fc3bde615134cb2bd262 Mon Sep 17 00:00:00 2001 From: Gauthier Roebroeck Date: Fri, 13 Mar 2026 16:16:09 +0800 Subject: [PATCH] add staleTime to transient book queries to avoid unnecessary refreshes --- next-ui/src/colada/transient-books.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/next-ui/src/colada/transient-books.ts b/next-ui/src/colada/transient-books.ts index 512613fc..3b8efd9e 100644 --- a/next-ui/src/colada/transient-books.ts +++ b/next-ui/src/colada/transient-books.ts @@ -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, }), )