diff --git a/src/lib/cms.ts b/src/lib/cms.ts index 47c93bc..0fc7155 100644 --- a/src/lib/cms.ts +++ b/src/lib/cms.ts @@ -77,6 +77,7 @@ async function cached( key: string, fn: () => Promise, ): Promise { + if (import.meta.env.DEV) return fn(); const hit = cache.get(key); if (hit && hit.expires > Date.now()) return hit.value as T; const pending = inflight.get(key) as Promise | undefined; @@ -122,7 +123,7 @@ export function cacheStats(): { size: number; keys: string[] } { * Wird gecacht (einmal pro Request/Build). */ export async function fetchOpenApi(): Promise { - if (openApiCache) return openApiCache; + if (openApiCache && !import.meta.env.DEV) return openApiCache; const base = getBaseUrl(); const res = await fetch(`${base}/api-docs/openapi.json`); if (!res.ok) { diff --git a/src/lib/components/Header.svelte b/src/lib/components/Header.svelte index 0e34326..a1ac5d5 100644 --- a/src/lib/components/Header.svelte +++ b/src/lib/components/Header.svelte @@ -96,6 +96,7 @@