Cache-Busting
This commit is contained in:
@@ -36,7 +36,7 @@ export default function Home({ params }: { params: Promise<{ locale: string }> }
|
||||
|
||||
const load = useCallback(async () => {
|
||||
try {
|
||||
const res = await fetch(`/api/matches?locale=${locale}`, { cache: "no-store" });
|
||||
const res = await fetch(`/api/matches?locale=${locale}&t=${Date.now()}`, { cache: "no-store", headers: { "Pragma": "no-cache", "Cache-Control": "no-cache" } });
|
||||
if (!res.ok) {
|
||||
const body = await res.json().catch(() => ({}));
|
||||
throw new Error(body.detail || `Fehler ${res.status}`);
|
||||
|
||||
Reference in New Issue
Block a user