Email or username:

Password:

Forgot your password?
3 comments
Yeshaya Lazarevich

@matthew I don't want to render the page every time it's viewed though. What I want it to be able to render it once and "cache" it on a cdn, until I can use a webhook to invalidate and rebuild that particular cached object when it's edited on the CMS

matthew
Yeah, that's SSR with extra steps 😀 You can just set up your CDN to cache pages for a long time, and then invalidate specific pages that you've changed by notifying the CDN (with Cloudfront this is pretty easy to do).
Yeshaya Lazarevich

@matthew how is that different from what they call Incremental Static Regeneration at NextJS?

nextjs.org/docs/pages/building

Part of my problem is that I don't want to wait until a page is visited to regenerate it (I assume that if I just invalidate the page then this is what would happen). I suppose that what I could do is just hit the page url after invalidating to trigger a rebuild. But it feels hacky, not using the tool (SSR+CDN cache) for the purpose it was made for.

@matthew how is that different from what they call Incremental Static Regeneration at NextJS?

nextjs.org/docs/pages/building

Part of my problem is that I don't want to wait until a page is visited to regenerate it (I assume that if I just invalidate the page then this is what would happen). I suppose that what I could do is just hit the page url after invalidating to trigger a rebuild. But it feels hacky, not using the tool (SSR+CDN...

Go Up