We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e4d7b0b commit 2e8ab2aCopy full SHA for 2e8ab2a
site/src/App.tsx
@@ -15,13 +15,17 @@ import {
15
} from "@mui/material/styles";
16
import { ThemeProvider as EmotionThemeProvider } from "@emotion/react";
17
18
+const shouldEnableCache =
19
+ window.location.hostname.includes("dev.coder.com") ||
20
+ process.env.NODE_ENV === "development";
21
+
22
const defaultQueryClient = new QueryClient({
23
defaultOptions: {
24
queries: {
25
retry: false,
- cacheTime: 0,
26
refetchOnWindowFocus: false,
- networkMode: "offlineFirst",
27
+ cacheTime: shouldEnableCache ? undefined : 0,
28
+ networkMode: shouldEnableCache ? undefined : "offlineFirst",
29
},
30
31
});
0 commit comments