You have a choice of purging resources individually by file, by Host, by Cache-Tag, or invalidating all resources at once from your cache.
How do I purge everything from the cache?
We strongly recommend using single file purge instead of full cache purge in most situations.
Purging the entire cache means all resources in Cloudflare's cache are immediately invalidated and the subsequent request for each invalidated resource will go back to your origin server(s) in an attempt to revalidate the resource. If the resource can't be revalidated, the resource in Cloudflare's cache will be replaced with the newer version of the resource from your origin. If you have many assets and lots of traffic, those requests could result in a substantial increase in requests to your origin and slow down your website.
To purge everything from cache, visit the caching app in the Cloudflare dashboard.
Under Purge Cache, select 'Purge Everything' from the menu.
How do I purge a single file from the cache?
A single or limited purge leaves the rest of the resources cached so that the requests don’t have to pull content from the origin server. We recommend this option if you don’t want to slow down the site.
Purging a single file from Cloudflare's cache immediately removes that resource from Cloudflare's cache and the subsequent requests for that resource will re-add that resource to the cache with the latest version served from the origin.
Note: Wildcards are not supported with single file purge at this time. So
example.com/*.js will NOT work. You need to specify the exact, full path to the file, including the
https://example.com/file.js -- those methods are distinct for cache purge purposes.
Same as above, in the caching app under 'Purge Cache', click on 'Purge Individual Files'
Pro Tip: Single File Cache Purge will not purge objects cached with an Origin header or other custom cache keys. You will need to purge these by sending an appropriate header through an API call.
How do I purge by Cache Tag?
Cloudflare allows Enterprise customers to tag content in the cache and then purge all content with a specific Cache-Tag. See documentation here.
How do I purge by Host?
Clearing the Cache via API
You can also clear the cache through an API call. Review the docs here: