From b9cf9cc8cd481f1fae32664b666809d95f70b8be Mon Sep 17 00:00:00 2001 From: Cho Young-Hwi Date: Sun, 15 Mar 2026 10:45:21 +0000 Subject: [PATCH] [#89] Add ISR revalidation to discover page (120s) Adds Next.js ISR with 120-second revalidation window so the ~200 RPC calls for trending/rising rankings happen at most once per 2 minutes instead of on every page load. Co-Authored-By: Claude Opus 4.6 (1M context) --- src/app/discover/page.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/app/discover/page.tsx b/src/app/discover/page.tsx index 57e3fec1..bab6d5a7 100644 --- a/src/app/discover/page.tsx +++ b/src/app/discover/page.tsx @@ -3,6 +3,8 @@ import { getTrendingStorylines, getRisingStorylines } from "../../../lib/ranking import { StoryCard } from "../../components/StoryCard"; import { TabNav } from "../../components/TabNav"; +export const revalidate = 120; // ISR: regenerate at most every 2 minutes + type SearchParams = Promise<{ tab?: string }>; const TABS = ["new", "trending", "rising", "completed"] as const;