There are several ways to purge the cache with Cloudflare. Purging the cache refers to the process of forcing Cloudflare to retrieve the latest updates of content and store the newest version in the cache. You are sure to find an option below that best suits your needs.
Options
Within Cloudflare Itself
Of course, you can purge the cache from within Cloudflare itself which gives you a wide range of options for what you want to clear. The only downside is that you need to know how to navigate Cloudflare and need the proper access. Here are the steps to perform cache clearing in Cloudflare:
Step 1
Login to Cloudflare.
Step 2
Look for the Purge Cache link in the top right corner of the home screen.
Step 3
Select either Custom Purge or Purge Everything. You rarely want to Purge Everything, so be cautious not to just push that. It’s better to do a custom purge on exactly what you need.
Step 4
You can now select which specific sections, pages, or URLs you wish to purge. As you can see, certain features are only applicable to Enterprise customers.
Cloudflare Chrome Extension
This is probably my favourite option as it’s so easy. If you're on Chrome, install the Cloudflare Purge Plugin. You still need to be set up as an authorized user in Cloudflare so that you can authenticate the extension. Once authenticated, you can navigate to the page you wish to purge and click Purge Current Page.
Automated Purge on Publish
Depending on your specific CMS and its capabilities, you can integrate Cloudflare and your CMS to automatically purge content when new content is published. Fishtank Consulting, for example, has built a universal plugin that integrates Cloudflare and Sitecore CMS. When content is published in Sitecore CMS, Cloudflare will automatically purge the pages related to that content. This is a great option as it’s fully automated and the users don’t need to learn something new. The only downside is the lack of control.
Other Options
There are plenty of other options—Cloudflare APIs are very powerful and flexible. You can build the functionality described in the first option within your CMS itself. You can create a bookmark to purge the cache on a specific URL. The options are endless depending on your specific requirements.