On this page
There are several ways that assets can be purged using the Dynamic Media App, by purging selected assets one at a time, purging asset variants using the purge path function or purging all assets for an account.
The Dynamic Media app
Purging functionality is available from the Dynamic Media app. If the app is not available on your account, please contact your Customer Success Manager.
CDNs place limits on the number of purge requests to be made and as such each account has a monthly allocation of purge credits. These limits are as follows:
1 account purge
120 asset purges
10 path purges
Each type of purge will use up one purge credit. You will be warned before starting a purge that it will reduce your credits.
Purging an asset
Purging will remove the asset from the cache of all the CDN edge servers. The time required to purge an asset can vary according to a number of factors, including:
Assets may be cached across multiple CDNs
Assets may still be cached in a user's browser cache and the browser cache TTL can vary between users and browsers
The amount of network traffic across each CDN
When the asset has been purged, the next request for that asset will take longer, since it will first request the latest version from the mid-tier CDN. If it's not found in the mid-tier CDN cache, then the asset will be requested from the origin servers.The asset is then cached on the CDN edge servers so that subsequent requests are handled faster.
To purge an asset, select the asset from the list in the Dynamic Media app and choose "Purge" from the menu on the right. Assets are purged one at a time and each request will use one of your purge credits. The use cases for using purge include replacing an asset with a newer version and completely deleting an asset from the CDN.
Replacing an asset with a newer version
In this case, a new version of an asset is available (perhaps the wrong version has been published) and you want to ensure that this is served to the user as soon as possible. The newer version of the asset is uploaded to Content Hub, replacing the existing version. It is then published. You then select the asset from the list in the Dynamic Media app and choose the "Purge" item from the menu to the right of the asset. The asset will then be removed from the CDN cache and when the purge is complete the newer version of the asset will be served to the user.
This use case is shown in more detail below.
We upload an asset named "armchairpurgetest", an image of a red armchair, to Content Hub. We can either publish this asset from Content Hub or from within the Dynamic Media App. When an asset is published, it is made available to serve from the Dynamic Media server (the origin server). When you choose "Toggle Preview" the version uploaded to Content Hub and the version on the origin server will be the same, in this the preview of the asset is the red armchair image.
Let's say that instead of using an image of a red armchair, we wanted to use a green armchair instead. Rather than wait up for 24 hours for the updated image to be available we want to use the purge function to make it available faster. We upload the green armchair image to Content Hub and publish it. Then we launch the Dynamic Media App, select the "armchairpurgetest" asset and choose "Toggle Preview" and can see that the asset image is now the green armchair.
However, the red armchair image will be cached on the CDN edge servers until the TTL expires, which could be up to 24 hours. So if we request the asset in a browser, the red armchair image will be retrieved from the CDN.
To purge the asset from the CDN, select it in the list and choose "Purge".
Purging an asset uses one of your purge credits and a warning dialog will be displayed asking if you want to continue.
Purging will remove the asset from the cache of all the CDN edge servers, although the time that this takes to complete will depend on a number of factors, as explained above.
When the asset has been purged, the next request for that asset will request the updated version from the origin servers. So in this case, when the asset purge is complete, the green armchair will be displayed. You may still need to clear the browser cache in order for the new image to be loaded.
Removing an asset
This refers to the case where want to completely remove an asset from the CDN cache without waiting for the TTL to expire. Removing an asset is a two step process. The asset will still be available in Content Hub, it just won't be available to serve to the user.
Unpublish the asset, by selecting it in the list in the Dynamic Media app and choosing "unpublish". Unpublishing an item will remove it from the mid-tier CDN cache as well as the origin servers. The asset will not be automatically purged from CDN edge servers.
Purge the asset from the CDN edge cache, by selecting the asset in the list and choosing "Purge". When the purge is complete, any request for the asset will fail since unpublishing the asset has removed it from the mid-tier cache and the origin.
When an asset is purged, all the derivatives of that asset will be purged as well. This is explained in more detail below.
Note that simply deleting an asset from Content Hub will not unpublish the asset or remove it from the CDN.
Adding ".jpg", ".png" or other image format to the URL of a set will return a preview image created from the first image or video that the set contains. This makes it easier to ensure that an image is always available to represent a product. For example:
will return a JPEG created from the first element of the set.
Because this preview image is created using the URL of the set, and not the URL of an individual asset within the set, the image will only be purged when the set itself is purged. So, if the individual elements of the set have been updated, you will need to purge both the updated assets and the set itself.
Variants of an Asset
The Dynamic Media service allows you to manipulate images "on the fly", transforming an image with parameters including size and resolution, to create a version of an image appropriate for a particular device or to use as a thumbnail, for example. These derivatives of an image are created by adding parameters to the image URL. In the case of the armchair asset, we could create a version with a width of 300 pixels using the following URL:
The first time the armchair asset with these parameters is requested, a new variant of the asset will be cached on the CDN. The asset may be used in several places with different parameters and many variants of any given asset may be cached on the CDN.
A group of parameters can also be included in a transformation template.
Rather than adding the parameters directly to the URL:
qlt=15&w=600 might be included in a transformation template named "exampletemplate" and referred to as follows:
All of the variants of an asset, whether generated directly by adding parameters to the URL or by using a transformation template, will be purged from the CDN cache when the asset itself is purged.
Purging a Path
The Dynamic Media app allows you to purge one or more individual URLs rather than purging all derivatives of an asset. For example, you may have made a change to a transformation template and don't want to purge all variants of an asset created using that template. You might also be using multiple transformation templates and only want to purge the derivatives of a particular asset created from one template.
To purge a path, choose the "Purge Path" item from the menu on the right hand side of the app window.
Enter the path to purge. The path must be specified using a partial rather than a full path. For example, to purge specified derivatives of the armchairpurgetest asset you would enter the following:
Purging a path will use one of your purge path credits. Paths can be added line by line, separated with a return character, with a maximum of 20 lines included in each request.
A detailed example of a path purge is shown below.
If we wanted to purge only the derivatives of the armchairpurgetest with the widths of 600 and 900 then we could enter
Alternatively we can choose the "Apply Suffixes" button and enter the parameters on separate lines in the "Add Suffixes" window.
Clicking the "Apply" button will append the parameters to the path we entered previously.
Click "Purge Path". The specified paths will now be purged.
An account purge will remove from the CDN cache all the cached assets for this account, including images, sets and video. The cache will be completely cleared of all assets, so the next asset request will be slower, since the CDN will fetch each asset from the origin servers and then cache the assets on the mid tier CDN and CDN edge servers. An account purge should only be required in exceptional circumstances. However, it does guaranteed that the cache is completely cleared and the latest version of all assets will be retrieved when the user requests them.
To perform an account purge, launch the Dynamic Media app and choose "Purge Account" from the menu on the right hand side of the window.
By default you have one account purge credit per month and a whole account purge will use up this credit.
To continue and purge all the assets from the CDN cache, click the "Purge Whole Account" button.