From 5263fa68348d66c1606dda1302eee9e2a265dfe0 Mon Sep 17 00:00:00 2001 From: Michilis Date: Mon, 16 Feb 2026 23:10:33 +0000 Subject: [PATCH] Make llms.txt always fetch fresh data from the backend - Switch from tag-based caching to cache: no-store for all backend fetches - Add dynamic = force-dynamic to prevent Next.js static caching - Ensures llms.txt always reflects the current featured event and FAQ data Co-authored-by: Cursor --- frontend/src/app/llms.txt/route.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/frontend/src/app/llms.txt/route.ts b/frontend/src/app/llms.txt/route.ts index 35d43ff..a0b4a97 100644 --- a/frontend/src/app/llms.txt/route.ts +++ b/frontend/src/app/llms.txt/route.ts @@ -28,7 +28,7 @@ interface LlmsEvent { async function getNextUpcomingEvent(): Promise { try { const response = await fetch(`${apiUrl}/api/events/next/upcoming`, { - next: { tags: ['next-event'] }, + cache: 'no-store', }); if (!response.ok) return null; const data = await response.json(); @@ -41,7 +41,7 @@ async function getNextUpcomingEvent(): Promise { async function getUpcomingEvents(): Promise { try { const response = await fetch(`${apiUrl}/api/events?status=published&upcoming=true`, { - next: { tags: ['next-event'] }, + cache: 'no-store', }); if (!response.ok) return []; const data = await response.json(); @@ -115,7 +115,7 @@ function getEventStatus(event: LlmsEvent): string { async function getHomepageFaqs(): Promise { try { const response = await fetch(`${apiUrl}/api/faq?homepage=true`, { - next: { revalidate: 3600 }, + cache: 'no-store', }); if (!response.ok) return []; const data = await response.json(); @@ -128,6 +128,8 @@ async function getHomepageFaqs(): Promise { } } +export const dynamic = 'force-dynamic'; + export async function GET() { const [nextEvent, upcomingEvents, faqs] = await Promise.all([ getNextUpcomingEvent(),