From ef70c14efab6d81182c4fe37587673a9bb3d4ac4 Mon Sep 17 00:00:00 2001 From: iFixKart Dev Date: Tue, 17 Nov 2026 19:45:40 +0530 Subject: [PATCH] fix(storefront): enforce cache no-store for apiFetch to ensure live CMS parity --- app/global-error.tsx | 1 + services/api/client.ts | 2 ++ 2 files changed, 3 insertions(+) diff --git a/app/global-error.tsx b/app/global-error.tsx index 2b5bc4e..851df27 100644 --- a/app/global-error.tsx +++ b/app/global-error.tsx @@ -116,3 +116,4 @@ export default function GlobalError({ error, reset }: GlobalErrorProps) { ); } + diff --git a/services/api/client.ts b/services/api/client.ts index b6f5fa3..cc5074b 100644 --- a/services/api/client.ts +++ b/services/api/client.ts @@ -93,6 +93,7 @@ export async function apiFetch( try { const response = await fetch(`${baseUrl}${endpoint}`, { + cache: rest.cache ?? 'no-store', ...rest, headers, credentials: 'include', @@ -103,6 +104,7 @@ export async function apiFetch( if (refreshed) { headers['Authorization'] = `Bearer ${getAccessToken()}`; const retryResponse = await fetch(`${baseUrl}${endpoint}`, { + cache: rest.cache ?? 'no-store', ...rest, headers, credentials: 'include',