From e1d56cc7738fbf89ec2490181e2c53fb9a56a443 Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Wed, 17 Jun 2026 14:31:38 +0000 Subject: [PATCH] fix(building-passport): don't cache property-meta fetch getPropertyMeta self-fetched /api/property-meta with revalidate:60 (despite a comment saying it shouldn't cache). Vercel's Data Cache served a stale response from before the headline backfill, so the current EPC rating / SAP rendered blank on the plans and plan-detail pages even though the API now returns them. Use cache:"no-store" so backfilled headline values propagate immediately. Co-Authored-By: Claude Opus 4.8 (1M context) --- .../[slug]/building-passport/[propertyId]/utils.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/app/portfolio/[slug]/building-passport/[propertyId]/utils.ts b/src/app/portfolio/[slug]/building-passport/[propertyId]/utils.ts index 7ab6bece..6728e09b 100644 --- a/src/app/portfolio/[slug]/building-passport/[propertyId]/utils.ts +++ b/src/app/portfolio/[slug]/building-passport/[propertyId]/utils.ts @@ -242,11 +242,13 @@ export async function getPropertyMeta( ): Promise { const url = process.env.URL + `/api/property-meta/${propertyId}`; - // Note, for the moment, we don't cache the data + // Don't cache: property meta (incl. headline SAP/EPC, which is now backfilled + // from the baseline table) changes as the modelling pipeline writes data, and + // a stale Data Cache entry was causing the current rating to render blank. const response = await fetch(url, { method: "GET", headers: { "Content-Type": "application/json" }, - next: { revalidate: 60 }, + cache: "no-store", }); if (!response.ok) { throw new Error("Network response was not ok");