mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-07-27 16:26:16 +08:00
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.
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user