From 34481b57c6f2493992e0698fe0cd3674a11e220d Mon Sep 17 00:00:00 2001 From: cv <34649812+cpvalente@users.noreply.github.com> Date: Thu, 20 May 2021 08:31:34 +0200 Subject: [PATCH] fix: cache time infinite attempt fixing issues with cache becoming undefined --- client/src/app/hooks/useFetch.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/app/hooks/useFetch.js b/client/src/app/hooks/useFetch.js index 6daf49350..3ddbdeaba 100644 --- a/client/src/app/hooks/useFetch.js +++ b/client/src/app/hooks/useFetch.js @@ -4,7 +4,7 @@ const refetchIntervalMs = 10000; export const useFetch = (namespace, fn) => { const { data, status, isError, refetch } = useQuery(namespace, fn, { refetchInterval: refetchIntervalMs, - cacheTime: refetchIntervalMs, + cacheTime: Infinity, }); return { data, status, isError, refetch };