Knowledge base

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

  1. Purging one or more specific files
  2. 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/*
  3. 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.

Important: There is a limit of 2000 URLs per request and 20 requests per 5 minutes, 180 requests per hour for each customer account (not Resource) in both Purge and Prefetch. These limits apply to both API and Purging/Prefetching tool inside the Settings area of your CDN Resource.

Updated on 15th October, 2024

Table of content
Can’t find what you are looking for?