diff --git a/lib/get-site-map.ts b/lib/get-site-map.ts index e5e567bc25..c345425b2b 100644 --- a/lib/get-site-map.ts +++ b/lib/get-site-map.ts @@ -27,7 +27,8 @@ export async function getSiteMap(): Promise { } const getAllPages = pMemoize(getAllPagesImpl, { - cacheKey: (...args) => JSON.stringify(args) + cacheKey: (...args) => JSON.stringify(args), + maxAge: 30_000 // 30s TTL — prevents stale sitemap cache on warm serverless instances }) const getPage = async (pageId: string, opts?: any) => {