CloudFlare has supported a way to purge your cache for the last year. Unfortunately, it was all or nothing. While that, for practical purposes, didn't cause a significant performance hit for most websites, since the cache would be rebuilt with the most popular files automatically and quickly, it still seemed inefficient. Why purge the whole cache, customers asked, when only a single file was updated?
The answer is technical: for a number of reasons based on how we store cache it's easier to mark all files as expired than to single out a single resource. And so, for the last year, purging everything or waiting for the cache to expire were our users only options.
Single File Purge
We're excited today to announce single file purge. The feature allows you to purge the cache of any URL without affecting any other cached files. To access the feature, from your My Websites page visit CloudFlare Settings and select Single File Purge from the Cache Purge section. There you can enter the URL of the object you want to purge from the cache. Hit the Purge button and, typically within less than a second, all the nodes in CloudFlare's global network will fetch a new copy of the file.
The feature is provided to all CloudFlare users, regardless of your plan type. Moreover, it's available via our API. We'll be providing more information over the next week, but our hope is developers will create systems that will detect when files on a server have been updated and automatically send an update to CloudFlare's network to ensure that the latest copy is fetched.