const fetchCache = new Map(); export async function cachedFetchJSON(url: string, options?: RequestInit): Promise { if (fetchCache.has(url)) return fetchCache.get(url); const response = await fetch(url, options).then((r) => r.json()); fetchCache.set(url, response); return response; }