Skip to content

Commit

Permalink
fixup! ⚡️(frontend) add stale cache
Browse files Browse the repository at this point in the history
  • Loading branch information
AntoLC committed Feb 19, 2024
1 parent 22e6702 commit 7362f94
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/frontend/apps/desk/src/pages/ConfigLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,17 @@ import { useCunninghamTheme } from '@/cunningham';
import { Auth } from '@/features/auth/Auth';
import '@/i18n/initI18n';

/**
* QueryClient:
* - defaultOptions:
* - staleTime:
* - global cache duration - we decided 3 minutes
* - It can be overridden to each query
*/
const queryClient = new QueryClient({
defaultOptions: {
queries: {
staleTime: 1000 * 60 * 3, // global cache duration - 3 minutes
staleTime: 1000 * 60 * 3,
},
},
});
Expand Down

0 comments on commit 7362f94

Please sign in to comment.