From f1ecb967bfd0580fec8b6d601a00f32c1c0438a5 Mon Sep 17 00:00:00 2001 From: Dock O'Neal Date: Sat, 3 Aug 2024 20:56:54 -0400 Subject: [PATCH] adding no-cache Cache-Control header policy. Adding no-cache Cache-Control header policy to prevent caching of server version. This ensures the correct server version is always retrieved. --- src/hooks/useSystemInfo.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hooks/useSystemInfo.ts b/src/hooks/useSystemInfo.ts index fda74f1439..83e5b58cf2 100644 --- a/src/hooks/useSystemInfo.ts +++ b/src/hooks/useSystemInfo.ts @@ -24,7 +24,7 @@ export const getSystemInfoQuery = ( api?: Api ) => queryOptions({ queryKey: [ 'SystemInfo' ], - queryFn: ({ signal }) => fetchSystemInfo(api, { signal }), + queryFn: ({ signal }) => fetchSystemInfo(api, { signal, headers: { 'Cache-Control': 'no-cache' } }), // Allow for query reuse in legacy javascript. staleTime: 1000, // 1 second enabled: !!api