A cache is just generated copies of your web content that are created to speed up the process of resolving a particular web page for the end user. Sometimes you may wonder why some updated content is not updating. This means you are viewing an old copy of the file, and the cache has not yet been updated. Cache purge will immediately remove all cached content on your website, causing Cloudflare to expire all cached static resources before the button is clicked and fetch a fresh version of your website. Purging the cache will only remove cached copies of files, not the files themselves. You may need to clear the cache in Cloudflare when you want to immediately retrieve the latest version of a file on your website. While caching helps your website load faster, it can also save outdated information, so your latest changes aren’t reflected on the site. Because Cloudflare must rebuild the cache after clearing it, site performance may be temporarily degraded. Follow these steps to clear the Cloudflare cache
- Log in to your Cloudflare account.
- In the left sidebar, click Websites, then click your domain name (testing.com):
- Cloudflare -> Select domain
- In the left sidebar, find the Caching menu, then choose the Configuration option
- Cloudflare - Caching - Configuration
- On the Caching Configuration page, under Purge Cache, find the cache-clearing options.
- Cloudflare -> Caching -> Configuration - > Purge Cache options
- You will be redirected to the caching overview page.
Here you can purge the cache for individual pages or items or purge everything.
Custom Purge - Specifies which pages you want to be purged
Purge Everything - Clears the cache for the entire website
- Click Custom Purge.
- In the text box, type the full URL (or multiple URLs) you want to clear from the cache,
and then click Purge.
NOTE: Once the cache is purged, the browser and server will need to re-download it, which may take some time. During this period, the loading time for purged pages may take a little longer than before the purging. Keep in mind that you will end up slowing down your site if you constantly purge resources from your site. When you purge the cache, it means
we have to fetch all requested resources from your server. It will take up to 3 days to rebuild the cache to an optimal level depending on your site traffic. This means that your site won’t perform optimally until the cache is rebuilt. Cloudflare offers a popular Content Distribution Network (CDN) service and purging of cache is very important when your site goes through changes. Cloudflare strongly recommends using single-file (URL) to maintain optimal site performance instead of completely purging the cache. For more information, you can refer to https://developers.cloudflare.com/cache/how-to/purge-cache/