How do I purge my cache?

You have a choice of purging resources individually by file or 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 dropdown 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 request 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*.js will NOT work. You need to specify the exact, full path to the file, including the or --  those methods are distinct for cache purge purposes.

Find the Cache Purge option by going to:

  1. Login to your CloudFlare account.
  2. From the dropdown on the top left, select your domain.
  3.  Select the Caching tab.
  4. Under 'Purge Cache', click on 'Purge Individual Files' 

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. Documentation here.

Clearing the Cache via API

You can also clear the cache through an API call. Review the docs here:
Purge all
Purge Individual

Still not finding what you need?

The CloudFlare team is here to help. 95% of questions can be answered using the search tool, but if you can’t find what you need, submit a support request.