caching changes

This commit is contained in:
Violet Caulfield
2025-03-27 06:08:36 -05:00
parent 62743b26c0
commit 4abb2ca33f
3 changed files with 3 additions and 10 deletions

View File

@@ -58,14 +58,7 @@ export default function App(): React.JSX.Element {
<PersistQueryClientProvider
client={queryClient}
persistOptions={{
/**
* Bust old data in favor of newer
* data
*/
buster: uuid.v4(),
persistOptions={{
persister: clientPersister,
/**

View File

@@ -19,7 +19,8 @@ export const queryClient = new QueryClient({
* or higher than the `maxAge`
*/
gcTime: Infinity,
staleTime: (1000 * 60 * 60) * 1 // 1 hour, users can manually refresh stuff too!
staleTime: (1000 * 60 * 60) * 1, // 1 hour, users can manually refresh stuff too!
refetchOnWindowFocus: false,
}
}
});

View File

@@ -18,5 +18,4 @@ const clientStorage = {
export const clientPersister = createSyncStoragePersister({
storage: clientStorage,
throttleTime: 0 // MMKV is FAST
});