diff --git a/src/lib/query-client.server.ts b/src/lib/query-client.server.ts index e99dc83a..54138ccf 100644 --- a/src/lib/query-client.server.ts +++ b/src/lib/query-client.server.ts @@ -1,11 +1,12 @@ import { QueryClient } from '@tanstack/react-query' -const cacheTime = parseInt(process.env.CACHE_MAX_AGE || "600000") +const staleTime = parseInt(process.env.CACHE_MAX_AGE || "60 * 60 * 1000") const queryClientServerIn = new QueryClient({ defaultOptions: { queries: { - cacheTime, + staleTime, + cacheTime: staleTime * 2, }, }, })