diff --git a/lib/resolve-notion-page.ts b/lib/resolve-notion-page.ts index e2365664e3..d609eec4be 100644 --- a/lib/resolve-notion-page.ts +++ b/lib/resolve-notion-page.ts @@ -28,8 +28,8 @@ export async function resolveNotionPage(domain: string, rawPageId?: string) { const useUriToPageIdCache = true const cacheKey = `uri-to-page-id:${domain}:${environment}:${rawPageId}` // TODO: should we use a TTL for these mappings or make them permanent? - const cacheTTL = 8.64e7 // one day in milliseconds - // const cacheTTL = undefined // disable cache TTL + // const cacheTTL = 8.64e7 // one day in milliseconds + const cacheTTL = undefined // disable cache TTL if (!pageId && useUriToPageIdCache) { try { diff --git a/next.config.js b/next.config.js index b534302aa4..718b35c9c2 100644 --- a/next.config.js +++ b/next.config.js @@ -9,6 +9,7 @@ module.exports = withBundleAnalyzer({ remotePatterns: [ { hostname: '**.nline.io' }, { hostname: '**.notion.so' }, + { hostname: '**.notionusercontent.com' }, { hostname: 'images.unsplash.com' }, { hostname: 'pbs.twimg.com' }, { hostname: 'abs.twimg.com' }, diff --git a/pages/api/recent-posts.ts b/pages/api/recent-posts.ts index 2891a1293f..ae315c8ebc 100644 --- a/pages/api/recent-posts.ts +++ b/pages/api/recent-posts.ts @@ -36,7 +36,7 @@ type Response = { */ export default async function (req: NextApiRequest, res: NextApiResponse) { const siteMap = await getSiteMap() - const ttl = 24 * 60 * 60 // 24 hours + const ttl = 1 * 60 * 60 // 24 hours // const ttl = undefined // disable cache TTL const data: Response = { posts: []