From 421106bf71ab3bed86ff1c152276a503b38a39d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Gremaud?= Date: Fri, 23 Oct 2026 23:56:20 +0200 Subject: [PATCH] fix staleTime to 5m instead of infinity --- polylan_submitter/src/queries.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/polylan_submitter/src/queries.ts b/polylan_submitter/src/queries.ts index 487c16e..ae00d1a 100644 --- a/polylan_submitter/src/queries.ts +++ b/polylan_submitter/src/queries.ts @@ -12,11 +12,11 @@ import { // fetchQuery() through the same cache. export const queryClient = new QueryClient(); -// Login/logout are full-page redirects, so the user can't change within a -// page load - only refetched once after a reload (see restoreQueryCache). +// Login/logout are full-page redirects, but roles/scopes can still change +// server-side, so don't keep the user forever. export const userQuery = () => ({ ...polylanSubmitterApiGetUserInfoOptions(), - staleTime: Infinity, + staleTime: 5 * 60 * 1000, }); // Games only change when staff enable/disable one, a few minutes of