mirror of
https://github.com/Jellify-Music/App.git
synced 2026-05-07 20:09:28 -05:00
tanstack query optimizations
This commit is contained in:
@@ -59,7 +59,7 @@ export default function App(): React.JSX.Element {
|
||||
client={queryClient}
|
||||
persistOptions={{
|
||||
persister: clientPersister,
|
||||
maxAge: (1000 * 60 * 60) * 24 // 1 Day
|
||||
maxAge: Infinity // 1 Day
|
||||
}}>
|
||||
<GestureHandlerRootView>
|
||||
<TamaguiProvider config={jellifyConfig}>
|
||||
|
||||
@@ -32,7 +32,9 @@ export default function BlurhashedImage({
|
||||
Math.ceil(height ?? width / 100) * 100 // So these keys need to match
|
||||
],
|
||||
queryFn: () => fetchItemImage(item.AlbumId ? item.AlbumId : item.Id!, type ?? ImageType.Primary, width, height ?? width),
|
||||
staleTime: (1000 * 60 * 60) * 24 * 7 // 1 week, to prevent overloading servers
|
||||
staleTime: (1000 * 60 * 60) * 24 * 7, // 1 week, to prevent overloading servers
|
||||
refetchOnMount: false,
|
||||
refetchOnWindowFocus: false
|
||||
});
|
||||
|
||||
const blurhash = !isEmpty(item.ImageBlurHashes)
|
||||
|
||||
Reference in New Issue
Block a user