From c94e2ea3ba4c327ffed22af391b682dec8cdd699 Mon Sep 17 00:00:00 2001 From: Florent Tapponnier <160007691+Flotapponnier@users.noreply.github.com> Date: Wed, 26 Aug 2026 12:16:55 +0200 Subject: [PATCH] fix: revalidate hl-cohort + hl-history on aggregate purge --- src/app/api/internal/revalidate-aggregate/route.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/app/api/internal/revalidate-aggregate/route.ts b/src/app/api/internal/revalidate-aggregate/route.ts index 39d221d94..0fdde6a41 100644 --- a/src/app/api/internal/revalidate-aggregate/route.ts +++ b/src/app/api/internal/revalidate-aggregate/route.ts @@ -44,5 +44,10 @@ export async function POST(req: Request): Promise { // worker publish. revalidateTag("benchmarks", "default"); revalidateTag("data-api-cohort", "default"); - return NextResponse.json({ revalidated: true, tags: ["bench-aggregate", "benchmarks", "data-api-cohort"] }); + // Invalidate HL cohort caches (builder stats, history blob, leaderboard) + // so new builders added to Prometheus (e.g. fomo) surface on the next + // request without waiting for the 1h unstable_cache TTL to expire. + revalidateTag("hl-cohort", "default"); + revalidateTag("hl-history", "default"); + return NextResponse.json({ revalidated: true, tags: ["bench-aggregate", "benchmarks", "data-api-cohort", "hl-cohort", "hl-history"] }); }