feat(FavPlayersPage): cache
This commit is contained in:
parent
d0aee38df8
commit
06665f3371
@ -26,7 +26,8 @@ export function FavePlayersPage() {
|
|||||||
const res = await fetch(`/api/fav/${aud}`);
|
const res = await fetch(`/api/fav/${aud}`);
|
||||||
const data = await res.json();
|
const data = await res.json();
|
||||||
return data;
|
return data;
|
||||||
}, { manual: true });
|
}, { manual: true, cacheKey: 'favListRequest', cacheTime: 3 * 60 * 1000 });
|
||||||
|
|
||||||
const list = useMemo(() => {
|
const list = useMemo(() => {
|
||||||
const l = showType === ShowType.LOCAL ? localList : favListRequest.data?.map(e => ({
|
const l = showType === ShowType.LOCAL ? localList : favListRequest.data?.map(e => ({
|
||||||
...e,
|
...e,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user