fix(version): reduce github requests [EE-7017] (#11677)

pull/11698/head
Ali 7 months ago committed by GitHub
parent 5a2e6d0e50
commit 10d20e5963
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -36,5 +36,9 @@ export async function getSystemVersion() {
}
export function useSystemVersion() {
return useQuery(queryKey, () => getSystemVersion());
return useQuery(queryKey, () => getSystemVersion(), {
// 24 hour stale time to reduce the number of requests to avoid github api rate limits
// a hard refresh of the browser will still trigger a new request
staleTime: 24 * 60 * 60 * 1000,
});
}

Loading…
Cancel
Save