fix staleTime to 5m instead of infinity
This commit is contained in:
@@ -12,11 +12,11 @@ import {
|
|||||||
// fetchQuery() through the same cache.
|
// fetchQuery() through the same cache.
|
||||||
export const queryClient = new QueryClient();
|
export const queryClient = new QueryClient();
|
||||||
|
|
||||||
// Login/logout are full-page redirects, so the user can't change within a
|
// Login/logout are full-page redirects, but roles/scopes can still change
|
||||||
// page load - only refetched once after a reload (see restoreQueryCache).
|
// server-side, so don't keep the user forever.
|
||||||
export const userQuery = () => ({
|
export const userQuery = () => ({
|
||||||
...polylanSubmitterApiGetUserInfoOptions(),
|
...polylanSubmitterApiGetUserInfoOptions(),
|
||||||
staleTime: Infinity,
|
staleTime: 5 * 60 * 1000,
|
||||||
});
|
});
|
||||||
|
|
||||||
// Games only change when staff enable/disable one, a few minutes of
|
// Games only change when staff enable/disable one, a few minutes of
|
||||||
|
|||||||
Reference in New Issue
Block a user