Skip to main content

Cache Control

Cache control helps manage how content is cached and served to users, improving website performance and reducing the load on origin servers.

General Configuration

Users can add, edit, disable, or delete cache control policies for your website. The general configuration includes:

  • Policy Name
  • URL Path: Configure the specific URL path(s) to which the policy applies.
  • TTL (Time to Live): Configure the time length (seconds) of caching the origin content.
  • Priority: Configure the priority of the policies. By default, the policy configured with no priority has the highest priority, with higher numbers indicating higher precedence.
  • Enable X-Cache: When enabled, all responses from the edge will have an X-Cache header with values like "HIT from da01.xy01.swiftserve.com", indicating whether the response was served from the cache (at least partially).
  • Ignore No Cache from Origin Server: When enabled, the CDN server still caches all contents from the origin regardless of the header of the response being configured as no-cache. The ignored headers are: Cache-Control, Authorisation, Set-Cookie, Expires and Pragma.
  • Ignore No Cache from Client: When enabled, the CDN server will ignore clients' no-cache header(s).
  • No Cache: When enabled, the CDN server will not cache the contents from the origin regardless of the header of the response being flagged as cachable. The ignored headers are: Cache-Control, Authorization, Set-Cookie, Expires and Pragma.
  • Disable Auto-Compression: When enabled, the CDN server will not automatically compress the contents with gzip.
  • Ignore Query String: When enabled, the CDN server will ignore all URL query strings when caching an object.

Customized Response Header

Users can configure the operation type for the customised response header.

Vary for Images

Configure Vary in the HTTP response header to ensure different user agents are served with compatible content types.

Advanced Settings

For more granular control over cache behaviour, the following options are available:

  • Allowed Referers: Configure a list of specific domains or domain suffixes separated with commas.
  • Allowed Origins: Configure a list of specific domains or domain suffixes separated with commas.

The configured policies help improve performance and ensure the contents are served efficiently and securely.