Pre-render caching

We’re trying to prerender our site for bots and update the pre-rendered versions immediately upon changes to the site. I see from the docs that the basic pre-render service can take 24-48 hours to update pre-rendered pages. In order to avoid this wait time, we are considering using an external service like prerender.io. But we wondered, would the CDN still serve old cached pre-rendered pages previously retrieved from the external service. If so, is there any way to invalidate these?

Thanks!

Hi there,

For our prerendering, it is as you say - the cache is stuck and won’t update until it updates.

For external prerendering services, think of them more like a proxy’d resource:

< cache-control: public, max-age=0, must-revalidate

So - I think you’d be safe to invalidate there and see immediate change on our CDN. Might ping their support to confirm my test results since I used the “public” test endpoint:

curl -v https://service.prerender.io/https://mysite.com

…whose behavior may or may not reflect an authenticated request like you’d be making if you were their customer. Their support is fantastic (I’ve worked with them a few times before)