Purge & Prefetch
Purge
Purging is the process of removing a cached file from the CDN data centers in order to repopulate the cache globally with an updated version of the file.
There are three methods of purging
- Purging one or more specific files
- A wildcard (*) purge will remove all nested content residing within the specified directory — the wildcard must be the last figure in the path, i.e., /path/to/file/*
- The “Purge All” function removes all cached content from the selected CDN Resource
Purge requests can be sent via API or directly in the CDN Client Panel by selecting the CDN Resource from which you would like to purge files, then selecting the “Purge” tab.
The purge request is sent immediately and the full removal of the content across all of our servers should happen within moments.
Prefetch
Requesting files from your origin server so that they're sent to the cache servers is something you may need to do every now and then. For example, if you've recently uploaded a large file onto your server, you can quickly prompt the cache servers to get that file and force them to cache it. This is known as Prefetching.
If you want to Prefetch files from your origin server, you can use the Prefetching tool inside the Settings area of your CDN Resource or our API. You can Prefetch a file by specifying the path to it.
If there already is an existing file in the CDN Network with the same file name as the incoming file, you must Purge the old file first before Prefetching the new one. You can do that by first running the purge request on the file, as mentioned above, and only then you can run the prefetch.
Updated on 15th October, 2024