Skip to content

Commit 462a220

Browse files
Slashgearclaude
andcommitted
perf: add ISR revalidation to past events page
Add revalidate = 3600 to avoid re-fetching all events from the Meetup API on every page visit. The page is now served from cache and revalidated once per hour. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent b8341d6 commit 462a220

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

  • app/evenements-precedents/[year]

app/evenements-precedents/[year]/page.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ import React from 'react';
33
import { Metadata } from 'next';
44
import { PastEvents } from './pastEvents';
55
import { fetchPastEvents } from '../../../modules/meetup/queries/past-events.api';
6+
export const revalidate = 3600;
7+
68
const DEFAULT_YEAR = `${new Date().getFullYear()}`;
79

810
export default async function PastEventsPage({ params }: { params: Promise<{ year?: string }> }) {

0 commit comments

Comments
 (0)