mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-10 04:30:25 +02:00
Adjust cache/stale times for other home items
This commit is contained in:
@@ -21,12 +21,18 @@ const HomeRoute = () => {
|
|||||||
recentlyPlayed: 0,
|
recentlyPlayed: 0,
|
||||||
});
|
});
|
||||||
|
|
||||||
const feature = useAlbumList({
|
const feature = useAlbumList(
|
||||||
limit: 20,
|
{
|
||||||
sortBy: AlbumListSort.RANDOM,
|
limit: 20,
|
||||||
sortOrder: SortOrder.DESC,
|
sortBy: AlbumListSort.RANDOM,
|
||||||
startIndex: 0,
|
sortOrder: SortOrder.DESC,
|
||||||
});
|
startIndex: 0,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
cacheTime: 1000 * 60,
|
||||||
|
staleTime: 1000 * 60,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
const featureItemsWithImage = useMemo(() => {
|
const featureItemsWithImage = useMemo(() => {
|
||||||
return feature.data?.items?.filter((item) => item.imageUrl) ?? [];
|
return feature.data?.items?.filter((item) => item.imageUrl) ?? [];
|
||||||
@@ -68,7 +74,7 @@ const HomeRoute = () => {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
keepPreviousData: true,
|
keepPreviousData: true,
|
||||||
staleTime: 0,
|
staleTime: 1000 * 60,
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -81,7 +87,7 @@ const HomeRoute = () => {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
keepPreviousData: true,
|
keepPreviousData: true,
|
||||||
staleTime: 0,
|
staleTime: 1000 * 60 * 60,
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user