CDN Caching

You can optimize your website and decrease page-loading time by caching data and site assets on the Content Delivery Network (CDN) available with Commerce web stores. After you set up CDN cache, data and site assets that are reused across your web store are always cached. Caching enables reused data and assets to be read quickly, increasing site performance.

Note:

CDN cache is not supported for Site Builder websites.

To learn more about CDN Caching, refer to the following sections:

Items Cached

The following items are cached by the CDN:

  • All image files hosted in the file cabinet, identified by filename extensions such as, .gif, .jpg, .bmp, and .png, as well as static file system images that might be referenced from default site templates.

  • The response output from the Item Search API. For example, a request to the Item Search API that returns a list of items.

  • The response output of executed SuiteScript hosted out of the file cabinet, if it sets response headers indicating the content is cacheable. This refers to SuiteScript associated with SSP applications.

  • SSP files

Note:

Files stored in the file cabinet for sale as download items are excluded from the CDN cache.

CDN Caching Times

The length of time that a certain type of content is cached in the CDN also indicates the time it takes for returning customers to see updated content. Note the following:

Type of Content

Example

How long is it Cached?

Static Content

Images, CSS

7 days

Scripts

Scripts that are not dependent on the session

2 hours

Content Delivery

page.ss

5 minutes

You can use the Cache Invalidation Request form to clear the CDN cache, but the browser cache remains untouched. For example, when you invalidate a URL, new customers see new content right away. Customers who reload the page without using the cache, for example by using the Ctrl + F5 keys, also see new content right away. But returning customers who reload the page normally, see old content until it expires in their browser cache. If CDN is enabled, static content in the browser cache expires automatically every two hours. Visitors who return to the website more than two hours after their last visit must therefore request fresh data from the CDN cache. If the static data in the CDN cache has been manually or automatically refreshed in these two hours, the visitors receive the new website content from the CDN cache.

Types of Domains to Use with CDN Caching

The following domain types allow CDN caching:

  • Web Store Only

  • Checkout Only

  • Single Domain for Web Store and Checkout

  • Hosted Web Pages

To use CDN caching with a web store domain, the domain must be associated with a SuiteCommerce or SuiteCommerce Advanced website. CDN caching cannot be used with SiteBuilder sites.

For Hosted Web Pages, the domain is not associated with a website, but you must use an account with SuiteCommerce or SuiteCommerce Advanced.

For more information about types of domains, see Set Up Domains for Web Stores.

Limiting Cache

As you build your Commerce web store, it is important to see your changes in real time. After you set up CDN cache, you can use tools and strategies to ensure that you are looking at updated website content. For more information, read the following topics:

  • Bypass CDN Cache – Use this strategy for setting up a subdomain for testing changes to your website.

  • Cache Invalidation Request – Learn how to invalidate the cache for the whole domain or for specified URLs.

  • Find URLs for Cache Invalidation – Learn how to locate specific URLs for cache invalidation requests. This topic also includes guidelines for sending cache invalidation requests for different types of website updates, such as banners and stylesheets.

Related Topics

Enable CDN Caching
Configure CDN Caching
Bypass CDN Cache
Cache Invalidation
CDN Caching for Secure Domains

General Notices