CDN Pro supports a purge function that allows you to override the cache time. This feature is handy when the content on your web server has changed and you want CDN Pro to update its servers with your changes. For example, if your website has a cache time of one week, but you want your website visitors to see a new update to one of your pages, you can use the purge option to flush the cache and enable your visitors to view the new content.
Purge activities are performed from the following page. To display this page, click Content Management > Purge in the left pane.
The following figure shows the key elements on the page, and the table following the figure describes them.
Fields | Description |
---|---|
1 | To filter purges, type characters in this field and then press the Enter key. Only purges containing the typed characters will be shown. Filtering is not case-sensitive. To remove the filter, click the x icon at the right side of the search field. |
2 | Each purge appears on its own row. Clicking an ID shows detailed information about the purge. |
3 | Icon to filter purges by their submission date. |
4 | The button to create purge requests. |
If the content on your origin web server has changed, request a purge to have CDN Pro distribute those changes.
*
). The top of the form shows the percentage of the daily purge quota that has been used.Fields | Description |
---|---|
Target Environment | Select whether the purge will occur in the staging or production environment. Default is staging. |
Purge Action | Select whether you want the content deleted or invalidated.
|
Purge Type | Select whether you want to purge a single file, multiple cache entries that match a wildcard, or all entries that match a regular expression. Default is file. For more information about purging using regular expressions, see Purging Entries That Match a Regular Expression below. Note: If the file has multiple variations due to a custom cache key, select Wildcard. |
Add files to purge | If Purge Type is set to File, enter the complete URL of the file to be purged and press Enter. Repeat this step for each additional file you want to purge. If you decide not to purge a file, delete it from this field. |
Add a file purge header | If Purge Type is set to File, specify the name and value of the HTTP request header included in the cache key, and then click Add Header. Repeat this step for each additional request header you want to purge. If you decide not to purge a request header, click the x icon at the right side of the header name. |
Add directories to purge | If Purge Type is set to Wildcard, enter the complete URL of the directory you want to purge, including optional wildcards, and press Enter. Repeat this step for each additional directory you want to purge. If you decide not to purge a directory, delete it from this field. Note: Observe the following guidelines:
|
Note: When the purge completes, a Purge Again button at the bottom right allows you to repeat a purge.
CDN Pro supports purges that use a regular expression (or "regex") pattern to match a cache key. The pattern must begin with {scheme}://{hostname}
where {scheme}
is http, https, or other entry that matches any scheme. For example: https://test.domain.com/my.*\.(jpg|png)\?q=
For performance considerations, observe the following guidelines:
By default, CDN Pro allows 1,000 entries in the fileUrls
list, 20 entries in the dirUrls
list, and 2 entries in the regexPatterns
list in each purge. The per-request and total number of allowed purges are subject to customer-specific quotas. CDN Pro also limits the size of the API request body.
Note: If you are a reseller, you can purge a child customer's domain. Your purge quota will apply.
CDN Pro allows you to purge directories by entering URLs in the Add directories to purge field. The URLs you enter can include wildcards.
The following table shows examples of purging directories with and without using wildcards.
Note: Files can have multiple variations if custom cache keys are used. In addition, a URL such as /pictures/
or /picture.jpg
can have many variations stored in the cache due to the Vary header or cache key customization. As a result, performing a folder purge without an asterisk clears all variations except subdirectories or files. For this reason, folder purges of /pictures/
, /pictures/*
, and /pictures/**
result in different behaviors.
Example | Description |
---|---|
http://test.domain2.com/mydir | Purge all variations of a single directory, but not its subdirectories or files. Variations may exist if custom cache keys are used. |
http://test.domain2.com/mydir/** | Purge all files and subdirectories whose cache key begins with http://test.domain2.com/mydir/. |
http://test.domain2.com/mydir/* | Purge all files, but not subdirectories, within a directory. |
http://test.domain2.com/mydir/*.jpg | Purge all cache entries ending with the .jpg file extension. Subdirectories of http://test.domain2.com/mydir/ are not purged. |
http://test.domain2.com/mydir/a* | Purge all files, but not subdirectories, that start with the letter "a". |
http://test.domain2.com/mydir/a** | Purge all files and subdirectories that start with the letter "a". |
http://test.domain2.com/mydir/a.jpg | Purge all variations of "a.jpg". Variations may exist if custom cache keys are used. |
http://test.domain2.com/my**jpg | Purge all entries whose cache key begins with http://test.domain2.com/my and ends with the suffix jpg. The "**" can match anything in the path including additional subdirectories. For example, http://test.domain2.com/mydirectory/picture.jpg would be purged. |
In the left pane, click Content Management, and then select Purge.
A Purge tab on the Content Management page shows details similar to those in the following figure: