From eba995ee7d26247e4238bd0f6db97a688973688d Mon Sep 17 00:00:00 2001 From: Michael Matloka Date: Mon, 30 Mar 2026 09:24:59 +0200 Subject: [PATCH] fix(code): set explicit gcTime on QueryClient Without an explicit gcTime, inactive queries using staleTime: Infinity stay "fresh" forever and never get garbage collected. Setting gcTime to 30 min ensures inactive query data is eventually cleaned up while being generous enough for a long-running desktop app. --- apps/code/src/renderer/utils/queryClient.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/code/src/renderer/utils/queryClient.ts b/apps/code/src/renderer/utils/queryClient.ts index 96916e9f8..64b0b1cd5 100644 --- a/apps/code/src/renderer/utils/queryClient.ts +++ b/apps/code/src/renderer/utils/queryClient.ts @@ -4,6 +4,7 @@ export const queryClient = new QueryClient({ defaultOptions: { queries: { staleTime: 1000 * 60 * 5, + gcTime: 1000 * 60 * 30, refetchOnWindowFocus: true, }, },