From f7b7216ef1a959bb64c52d60d79beaad8f7b0fd7 Mon Sep 17 00:00:00 2001 From: kyuuseiryuu Date: Wed, 25 Mar 2026 12:02:51 +0900 Subject: [PATCH] fix(fav-page): switch from static cacheKey to dynamic refreshDeps - Replace the static `cacheKey` with `refreshDeps: [headers]` in the query configuration. - This ensures the cached data is automatically refreshed when the headers dependency changes, rather than relying on a static cache identifier. --- src/page/FavPlayersPage.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/page/FavPlayersPage.tsx b/src/page/FavPlayersPage.tsx index 579667f..38a5a8f 100644 --- a/src/page/FavPlayersPage.tsx +++ b/src/page/FavPlayersPage.tsx @@ -39,7 +39,7 @@ export function FavePlayersPage() { const res = await fetch(`/api/fav`, { headers }); const data = await res.json(); return data; - }, { manual: true, cacheKey: 'favListRequest', cacheTime: 3 * 60 * 1000 }); + }, { manual: true, refreshDeps: [headers], cacheTime: 3 * 60 * 1000 }); const list = useMemo(() => { const l = showType === ShowType.LOCAL ? localList : favListRequest.data?.map(e => ({