diff --git a/app/api/events/route.ts b/app/api/events/route.ts index 0a5ced7..9bbbd23 100644 --- a/app/api/events/route.ts +++ b/app/api/events/route.ts @@ -44,10 +44,9 @@ export async function GET() { const responseJson = NextResponse.json({ events, page }) - // Disable vercel cache responseJson.headers.set( 'Cache-Control', - 'no-store, no-cache, must-revalidate, proxy-revalidate' + 'no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0, s-maxage=0, stale-while-revalidate=0' ) responseJson.headers.set('Pragma', 'no-cache') responseJson.headers.set('Expires', '0') diff --git a/hooks/useNotion.ts b/hooks/useNotion.ts index cd30c02..974e24c 100644 --- a/hooks/useNotion.ts +++ b/hooks/useNotion.ts @@ -16,7 +16,7 @@ const fetcher = async (url: string) => { export function useGetNotionEvents() { const { data, error } = useSWR<{ events: EventProps['event'][]; page: any }>( - `/api/events`, + `/api/events?timestamp=${Date.now()}`, fetcher, { refreshInterval: 60000,