mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-07-28 00:35:32 +08:00
a33f8fe973
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.
15 lines
264 B
TypeScript
15 lines
264 B
TypeScript
import { QueryClient } from "@tanstack/react-query";
|
|
|
|
export const queryClient = new QueryClient({
|
|
defaultOptions: {
|
|
queries: {
|
|
retry: 1,
|
|
refetchOnWindowFocus: true,
|
|
staleTime: 0,
|
|
},
|
|
mutations: {
|
|
retry: false,
|
|
},
|
|
},
|
|
});
|