Why when I create a page and publish it, the first two times I access it, does the nextjs error “This page could not be found.” return? What can I do to solve this?
Hi Yan,
Thank you for contacting us.
Do you mean you were able to access it the first two times, but then you got the error?
Thanks,
no, after publishing the first two times I get the error, I have to press ctrl + f5 both times for the page to render the third time
Hi Yan,
There are a couple caching options you can try. In a development environment you can set cachebust=true
to get the latest content. Although we do not recommend turning on cachebust
in production as it can slow down performance. You can also play around with the cacheSeconds
or staleCacheSeconds
options although similarly we recommend sticking to the default values for better performance. One example of when you might want to reduce cacheSeconds
is for an announcement bar section that changes content frequently.
You may also find this forum post useful which goes into more detail about how Builder.io handles caching. Hope this helps!
How long does the cache take to clear after publishing content?
Thanks,