From 8f48c6a8769473d531093ec2cebc75e7b4351ce2 Mon Sep 17 00:00:00 2001 From: Froidefond Julien Date: Thu, 26 Mar 2026 08:39:02 +0100 Subject: [PATCH] fix: disable Next.js fetch cache for settings API calls Co-Authored-By: Claude Sonnet 4.6 --- apps/backoffice/lib/api.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/backoffice/lib/api.ts b/apps/backoffice/lib/api.ts index 894293b..0c5cb28 100644 --- a/apps/backoffice/lib/api.ts +++ b/apps/backoffice/lib/api.ts @@ -563,7 +563,7 @@ export type ThumbnailStats = { }; export async function getSettings() { - return apiFetch("/settings", { next: { revalidate: 60 } }); + return apiFetch("/settings", { cache: "no-store" }); } export async function updateSetting(key: string, value: unknown) { @@ -574,7 +574,7 @@ export async function updateSetting(key: string, value: unknown) { } export async function getCacheStats() { - return apiFetch("/settings/cache/stats", { next: { revalidate: 30 } }); + return apiFetch("/settings/cache/stats", { cache: "no-store" }); } export async function clearCache() { @@ -584,7 +584,7 @@ export async function clearCache() { } export async function getThumbnailStats() { - return apiFetch("/settings/thumbnail/stats", { next: { revalidate: 30 } }); + return apiFetch("/settings/thumbnail/stats", { cache: "no-store" }); } // Status mappings