From a33f8fe9735d3c045b59a36736919393d4d1d451 Mon Sep 17 00:00:00 2001 From: Jason Date: Sat, 7 Feb 2026 11:05:57 +0800 Subject: [PATCH] perf: remove unnecessary query cache for Tauri local IPC Tauri IPC calls are in-process (microsecond latency), so the 5-minute staleTime and disabled refetchOnWindowFocus from web app templates are counterproductive. Set staleTime to 0 and enable refetchOnWindowFocus so external config changes are reflected immediately. --- src/lib/query/queryClient.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/query/queryClient.ts b/src/lib/query/queryClient.ts index 2d3a9e2b8..ed5001759 100644 --- a/src/lib/query/queryClient.ts +++ b/src/lib/query/queryClient.ts @@ -4,8 +4,8 @@ export const queryClient = new QueryClient({ defaultOptions: { queries: { retry: 1, - refetchOnWindowFocus: false, - staleTime: 1000 * 60 * 5, + refetchOnWindowFocus: true, + staleTime: 0, }, mutations: { retry: false,