From f6677c8d5211d607770b7ba5d0fc842e8d6d9f67 Mon Sep 17 00:00:00 2001 From: amanape <83104063+amanape@users.noreply.github.com> Date: Thu, 9 Jan 2025 18:21:42 +0400 Subject: [PATCH] Optimize requests made to the API --- frontend/src/entry.client.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/frontend/src/entry.client.tsx b/frontend/src/entry.client.tsx index 06ebe25a8287..125833618e34 100644 --- a/frontend/src/entry.client.tsx +++ b/frontend/src/entry.client.tsx @@ -57,6 +57,10 @@ const queryClient = new QueryClient({ }, }), defaultOptions: { + queries: { + staleTime: 1000 * 60 * 5, // 5 minutes + gcTime: 1000 * 60 * 15, // 15 minutes + }, mutations: { onError: (error) => { toast.error(error.message);