How to Flush the Cloudflare Cache

What is Cache?

A cache consists of generated copies of your web content, designed to speed up the process of loading web pages for end users. If you notice that some updated content isn’t reflecting on your site, it may be because you’re viewing an old cached copy.

Why Clear the Cache?

Purging the cache will remove all cached content on your website, prompting Cloudflare to expire all static resources and fetch a fresh version of your site. Keep in mind:

  • Cached copies are temporary: Purging removes only cached versions, not the actual files on your server.

  • Performance impact: Site performance may temporarily degrade as Cloudflare rebuilds the cache after clearing it.

Clearing the cache helps ensure that visitors see the latest version of your content.

Steps to Clear the Cloudflare Cache

  1. Log in to your Cloudflare account.

  2. Select your domain:

    • In the left sidebar, click Websites, then click your domain name (e.g., testing.com).

  3. Access the Caching menu:

    • In the left sidebar, find the Caching menu, then choose the Configuration option.

  4. Purge Cache Options:

    • On the Caching Configuration page, look for the Purge Cache section.

Purging Options

  • Custom Purge: Specify individual pages to purge.

  • Purge Everything: Clears the cache for the entire website.

Custom Purge Steps

  1. Click Custom Purge.

  2. Enter the full URLs (or multiple URLs) you want to clear from the cache.

  3. Click Purge.

By purging a single file, it will be immediately removed from the Cloudflare cache, and the next request will fetch the latest version from your origin server.

Purge Everything Steps

  1. Click Purge Everything.

  2. Confirm your action by clicking Purge Everything again.

Note: It may take up to 30 seconds for Cloudflare to clear the cache.

Purging the entire cache can lead to increased requests to your origin server, potentially slowing down your website, especially during high traffic periods.

Important Considerations

  • Loading Time: After purging, browsers and servers will need to re-download the content, which may temporarily slow loading times for purged pages.

  • Cache Rebuilding: It can take up to 3 days to rebuild the cache to an optimal level depending on your site traffic. During this time, performance may not be ideal.

Recommendation

Cloudflare recommends using single-file (URL) purging instead of completely purging the cache to maintain optimal site performance. This approach minimizes the impact on site speed while ensuring your visitors see the latest content.

Regularly review and manage your cache to ensure your website remains fast and responsive while displaying the most current content.

Last updated

Was this helpful?