mirror of
https://github.com/cpvalente/ontime.git
synced 2026-09-10 08:39:34 +00:00
fix: cache time infinite
attempt fixing issues with cache becoming undefined
This commit is contained in:
@@ -4,7 +4,7 @@ const refetchIntervalMs = 10000;
|
|||||||
export const useFetch = (namespace, fn) => {
|
export const useFetch = (namespace, fn) => {
|
||||||
const { data, status, isError, refetch } = useQuery(namespace, fn, {
|
const { data, status, isError, refetch } = useQuery(namespace, fn, {
|
||||||
refetchInterval: refetchIntervalMs,
|
refetchInterval: refetchIntervalMs,
|
||||||
cacheTime: refetchIntervalMs,
|
cacheTime: Infinity,
|
||||||
});
|
});
|
||||||
|
|
||||||
return { data, status, isError, refetch };
|
return { data, status, isError, refetch };
|
||||||
|
|||||||
Reference in New Issue
Block a user