We are working on a Next.js website that is currently being developed, and occasionally, we need to deploy updates to the production site. After each deployment we are wondering if do we need to purge the Cloudflare cache? And if the changes are too small will it still be worth it to purge?
Our concern for purging the cache is it will slowdown the website which then affect user experience and our SEO.
Use “Development Mode” option from the Cloudflare dashboard.
Otherwise, make sure to send request on each “build” or “deploy” calling for a resource filetype by using a scheme like example.com/dist/res.css?ver=123 → notice the ?ver=123, each time change the value on deply to see the changes (if not using the “Development Mode”).
Kindly, see at the article from below which filetypes are cached by default (which is why you’re suggesting Purging Everything each time):
Also, there’s a lot of argument about adding query strings to invalidate cache is not the best practice and we had issues with it before. https://www.keycdn.com/support/remove-query-strings-from-static-resources
Our main concern is the website’s content, which is stored and distributed globally by Cloudflare. If we make changes to the content, such as texts, images, or layout, is it recommended to purge the cache? https://developers.cloudflare.com/cache/get-started/