mirror of https://github.com/portainer/portainer
fix(version): reduce github requests [EE-7017] (#11679)
parent
2856d0ed64
commit
0be1888f11
|
@ -36,5 +36,9 @@ export async function getSystemVersion() {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function useSystemVersion() {
|
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…
Reference in New Issue