File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -2,15 +2,18 @@ import { NextResponse } from 'next/server'
22
33import { logger } from '@/util/logger'
44import { applyCacheHeaders } from '@/server/apply-cache-headers'
5- import { getCachedAgents } from '@/server/agents-data'
5+ import { fetchAgentsWithMetrics } from '@/server/agents-data'
66
77// ISR Configuration for API route
88export const revalidate = 600 // Cache for 10 minutes
99export const dynamic = 'force-static'
1010
1111export async function GET ( ) {
1212 try {
13- const result = await getCachedAgents ( )
13+ // Note: We use fetchAgentsWithMetrics directly instead of getCachedAgents
14+ // because the payload is >2MB and unstable_cache has a 2MB limit.
15+ // ISR page-level caching (revalidate: 600) handles caching adequately.
16+ const result = await fetchAgentsWithMetrics ( )
1417
1518 const response = NextResponse . json ( result )
1619 return applyCacheHeaders ( response )
You can’t perform that action at this time.
0 commit comments