Should cache be purged after every deployment or when performing a rebuild

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.

Best,
Robin

CSS, JS and images?

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):

Thank you for your response.

I apologize for any misunderstanding, but the main focus is not on the assets themselves. We utilize a process called ‘Content fingerprinting’ to prevent caching problems, and the framework takes care of this automatically. Additionally, Google recommends implementing content fingerprinting as a best practice. https://developers.google.com/search/docs/crawling-indexing/javascript/javascript-seo-basics#caching.

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/