Purging Cached Assets (Overview)

Cached content can be purged from:

The purpose of purging content is to force the CDN to request a new version of the content in question from an origin server. This ensures that the latest version of the content in question is delivered to your clients.

Purging does not delete content from the origin server. A file management tool (e.g., SFTP or rsync) may be used to delete content from an origin server.

Purging Content

Cached content may be purged from our network (i.e., edge servers) through the Purge/Load page.

Key information:

To purge content

  1. Navigate to the Purge/Load page corresponding to the desired platform.
  2. From the URL option, which can be found under the Purge From Edge section, select the base URL where the desired content can be found.
  3. Directly below the URL option, type the path to the directory containing the asset(s) to be purged. Since a forward slash (/) has been added for your convenience, make sure that this relative path starts after the forward slash.
  4. Perform one of the following:

    Purge Procedure Sample Syntax

    Asset

    Append the name of the asset that you would like to purge to the relative path specified in step 3.

    presentations/Gala_01.flv

    Set of Assets

    Determine the naming convention and/or file type that will be used to identify the assets that will be purged. Append that pattern to the relative path specified in step 3.

    presentations/gala*.fl*

    Directory

    Append an asterisk (i.e., /*.*), a period, and another asterisk to the relative path specified in step 3.

    presentations/*.*

    Directory (Recursive)

    Append an asterisk (i.e., /*) to the relative path specified in step 3.

    presentations/*

  5. From the Regions option, perform one of the following steps:

    • Purge All Regions (Recommended): Select All.
    • Purge Specific Regions:

      1. Select Custom.
      2. Mark the regions that should be purged.
      3. Clear all other regions.
  6. Click Purge Content.

To perform a bulk purge

  1. Navigate to the Purge/Load page corresponding to the desired platform.
  2. Click the "Bulk Purge" link, which can be found under the Purge From Edge section, to display the URLs option.
  3. In the URLs option, type the CDN or edge CNAME URL that points to the asset(s) that will be purged.
  4. Add another purge request by pressing ENTER and then specifying the desired CDN or edge CNAME URL. Repeat this step as needed.
  5. From the Regions option, perform one of the following steps:
    • Purge All Regions (Recommended): Select All.
    • Purge Specific Regions:

      1. Select Custom.
      2. Mark the regions that should be purged.
      3. Clear all other regions.
  6. Click Purge Content.

Each CDN or edge CNAME URL specified in the URLs option must be placed on a separate line. This can be accomplished by using a carriage return to delimit each CDN or edge CNAME URL. Using any other type of character (e.g., a comma) as a delimiter may prevent the asset from being purged.

Purge Syntax: Individual Assets

An individual assetA file is the most commonly known example of an asset. Refers to any collection of data that is typically stored as a single unit on a storage unit (e.g., disk drive). An example of an asset that is not physically stored on a disk drive occurs when dynamically generated content is not cached. may be purged by specifying a CDN or an edge CNAME URL that points to it. This type of purge request will also purge all query string variations of the specified asset at that location. Sample URLs are provided below.

URL Type Sample URL

CDN URL

http://wpc.0001.edgecastcdn.net/000001/resources/homepage.html

Edge CNAME URL

http://cdn.sampleurl.net/resources/homepage.html

Purge Syntax: File Name Patterns

One or more asterisks may be used to restrict purging to content whose filename matches the specified pattern.

Key information:

Learn how to purge directories.

Sample purges are provided below.

Scope Syntax/Example

All files that reside in the specified directory.

Syntax:

Append the following value to the URL that points to the desired directory:

/*.*

Example:

http://cdn.sampleurl.net/sales/*.*

All files that meet both of the following conditions:

  • Match the specified file extension.
  • Reside within the specified directory.

Syntax:

Append the following value to the URL that points to the desired directory:

Example:

http://cdn.sampleurl.net/sales/*.htm

All files that meet both of the following conditions:

  • Match the specified filename pattern.
  • Reside within the specified directory.

Syntax:

URL to the desired directory plus a filename pattern that identifies the desired files.

Example:

http://cdn.sampleurl.net/sales/a*.ht*

Purge Syntax: Query String Variations

By default, our CDN service does not take into account query strings when caching content. However, query string caching may be enabled through either of the following:

Several examples on how query string variations of an asset may be purged are provided below.

Scope Syntax/Example

Purge:

  • Original asset
  • All of its query string variations.

Syntax:

Full URL (including filename)

Example:

http://cdn.sampleurl.net/path/sampleasset.htm

Purge original asset only.

Query string variations of the specified asset will not be purged.

Syntax:

Full URL plus a question mark

Example:

http://cdn.sampleurl.net/path/sampleasset.htm?

Purge a specific query string variation of an asset.

The original asset and all other query string variations of that asset will not be purged.

Syntax:

Full URL plus query string

Example:

http://cdn.sampleurl.net/path/sampleasset.htm?user=Joe

Purge Syntax: Directory's Default Cached Asset

The default asset cached for a particular directory (i.e., directory index) may be purged through the use of the syntax described below.

Scope Syntax/Example

Purge:

  • Default cached asset for a directory
  • All of its query string variations.

Syntax:

Append / to the URL that points to the desired directory.

Example:

http://cdn.sampleurl.net/path/

Purge the default cached asset for a directory.

Query string variations of the specified asset will not be purged.

Syntax:

Append the following value to the URL that points to the desired directory:

/?

Example:

http://cdn.sampleurl.net/path/?

Purge a specific query string variation of the default cached asset for a directory.

The default cached asset for that directory and all other query string variations of that asset will not be purged.

Syntax:

Append a query string to the URL that points to the desired directory.

Example:

http://cdn.sampleurl.net/path/?user=Joe

When purging the default asset that was cached for a particular directory, keep in mind that there are certain conditions that may cause an asset other than the default asset for that directory to be purged. For example, specifying /path/ may not be the same as specifying /path/index.html even if index.html is the default asset for that directory. For example, this occurs when the specified URL is redirected or if URL rewriting is used.

Purge Syntax: Directory

The contents of a directory can be purged through the use of wildcards (i.e., *.*). This syntax will purge all of the assetA file is the most commonly known example of an asset. Refers to any collection of data that is typically stored as a single unit on a storage unit (e.g., disk drive). An example of an asset that is not physically stored on a disk drive occurs when dynamically generated content is not cached.s contained in the specified directory. It will not purge assets stored in subdirectories of the purge path.

Sample purge request:

http://cdn.sampleurl.net/path/*.*

Purge Syntax: Directory (Recursive)

All of the assets contained in a specified directory and its subfolders can be purged by appending /* to the purge directory.

Sample purge request:

http://cdn.sampleurl.net/path/*

An asterisk cannot be used to specify a directory pattern. It can only be used as specified above or when defining a pattern that will be used to define the set of assets that will be purged (e.g., /*.css).

Regions

Content may be purged from our entire network or solely from specific regions. Purging by region provides additional flexibility for determining when updated content may be served to clients.

Regional purging is designed to meet specialized cache management needs. When in doubt, purge content from all regions.

By default, purges are applied across the entire CDN network.

The available set of regions are described below.

Region Description

North America

This region encompasses all POPs in North America.

US: Eastern Time Zone

This region encompasses all POPs in the Eastern Time zone of the United States.

View map.

US: Central Time Zone

This region encompasses all POPs in the Central Time zone of the United States.

View map.

US: Pacific Time Zone

This region encompasses all POPs in the Pacific Time zone of the United States.

View map.

Europe

This region encompasses all POPs in Europe.

Asia

This region encompasses all POPs in Asia and Australia.

South America

This region encompasses all POPs in South America.

View a list of POPs and their corresponding regions.

Key information:

More Information