Skip to content

Commit

Permalink
adding no-cache Cache-Control header policy.
Browse files Browse the repository at this point in the history
Adding no-cache Cache-Control header policy to prevent caching of server version. This ensures the correct server version is always retrieved.
  • Loading branch information
Doxterpepper authored and thornbill committed Aug 13, 2024
1 parent fc4f396 commit f1ecb96
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/hooks/useSystemInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f1ecb96

Please sign in to comment.