Skip to main content

Cache purge

The purpose of using Akamai as a CDN is to reduce the need for a Sitecore CD instance to handle visitor requests. The first time a page is requested, Akamai must request the page from the origin (i.e. Sitecore CD instance). But all subsequent requests for the page can be handled by Akamai CDN.

The following diagram illustrates the logic that results in a personalized page being delivered to a visitor.

Uniform provides the ability to purge entries from the Akamai cache. This is necessary when content in Sitecore changes. By purging the pages in Akamai cache, Akamai is forced to retrieve the latest content from Sitecore.

Akamai API client#

In order to purge entries from the Akamai cache, Uniform must make API calls to Akamai. This requires the following be in place:

  • An API client must be configured in Akamai.
  • Settings for the API client must be added to Sitecore.

Details on how to determine these settings and add them to Sitecore are available in the installation instructions.

An API client is the collection of settings that Uniform uses to make API calls to Akamai. The settings can be broken down into the following categories:

Connectivity#

Connectivity settings are used to establish the connection between Uniform and Akamai. These values are generated by Akamai during the installation process. These settings include:

  • Access token
  • API URL
  • Client secret
  • Client token

Selection#

Uniform uses selection settings to identify which parts of the Akamai cache to purge. These settings include:

  • Network - In Akamai, a property has separate settings for staging and production. This setting identifies which of those networks cache purge instructions are sent to.
  • Host names - When Uniform sends to Akamai a list of URLs to purge, it also sends one-or-more host names so that Akamai can locate the appropriate cache entries.
  • CP codes - In Akamai, each property is represented by a CP code. This setting identifies the Akamai property that is associated with the API client. CP codes are used during full-site cache purge.

Triggering cache purge#

Manual#

Akamai cache can be purged manually from Sitecore Content Editor. Buttons are available in the "Uniform" ribbon. Depending on the item selected in Content Editor, different cache purge commands are available:

Page#

Page cache purge is available when the selected item is identified as a page in the Uniform Map Service.

When page cache purge is triggered, the following URLs are purged:

  • URL that corresponds to the selected item
  • URLs for dependent pages of the selected item

Tree#

Page cache purge is available when the selected item is identified as a page in the Uniform Map Service.

When tree cache purge is triggered, the following URLs are purged:

  • URL that corresponds to the selected item
  • URLs for dependent pages of the selected item
  • URLs of pages that are descendants of the selected item
  • URLs for dependent pages of the descendants of the selected item

Site#

Site cache purge is available when the selected item is a Uniform Site Configuration item.

When site cache purge is triggered, all URLs are purged for the site. This is accomplished by using the CP codes assigned to the site.

Automated#

Automated cache purge is triggered by the Uniform deploy process. The Uniform deploy process is triggered by publishing.