1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

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.
This commit is contained in:
Dock O'Neal 2024-08-03 20:56:54 -04:00 committed by Bill Thornton
parent fc4f396808
commit f1ecb967bf

View file

@ -24,7 +24,7 @@ export const getSystemInfoQuery = (
api?: Api api?: Api
) => queryOptions({ ) => queryOptions({
queryKey: [ 'SystemInfo' ], queryKey: [ 'SystemInfo' ],
queryFn: ({ signal }) => fetchSystemInfo(api, { signal }), queryFn: ({ signal }) => fetchSystemInfo(api, { signal, headers: { 'Cache-Control': 'no-cache' } }),
// Allow for query reuse in legacy javascript. // Allow for query reuse in legacy javascript.
staleTime: 1000, // 1 second staleTime: 1000, // 1 second
enabled: !!api enabled: !!api