Cache Settings

Generally, there are three levels of content expiry settings in OnApp CDN:

  • Origin server level
  • CDN resource level
  • Cloud owner level

Origin Server Level

End users may modify the Cache-Control header on the origin server (where the content is hosted). For example, Apache config or htaccess rule. An HTTP meta tag is not supported.

CDN Resource Level

Customers can configure the content expiry settings of the CDN resource in Control Panel. Refer to the Create HTTP CDN Resource page.

Please note that the maximum value is 71582788.

Cloud Owner Level

Cloud owner may configure the global content expiry time.

To change CDN cache settings:

 1. Go to your Dashboard ( > CDN > Portal menu.
 2. On the page that appears, click the CDN Management drop-down list and select HTTP Setting.
 3. On the following page, you can edit your CDN cache settings:

Cache Expiration

Set the time period for cache expiration and select one of the options:

  • minutes
  • hours
  • days

Nginx Settings

  • Resources – select the CDN resource from the drop-down list. To add a new CDN resource, click  under the Nginx Settings table
  • Limit rate – set the speed limit at which user can download the content from the edge server
  • After – set the initial amount after which the further transmission of a response to a client will be rate limited
  • Cache key – a key for caching. Select one of the four supported types from the drop-down list:

• $host$request_uri
• $host$uri
• $proxy_host$request_uri
• $proxy_host$uri

  • Read Timeout - defines a timeout for reading a response from an edge. If the edge server does not transmit anything within this time, the connection is closed
  • Connect Timeout - defines a timeout for establishing a connection with an edge server

    Please note that this timeout cannot usually exceed 75 seconds.

  • Ignore Set Cookies - select one of the options:

• Allowed
• Disabled

FLV/MP4 Settings

Pseudo streaming allows end users to view video files over HTTP servers and at the same time allow them to seek the video files (fast forward to 30 minutes or 1 hour later for a 2-hour movie file).

  • Resource - select the resource from the drop-down list. To add a new resource, click under the FLV/MP4 Settings table
  • MP4 Pseudo Streaming – select one of the options:

• enabled
• disabled

  • FLV Pseudo Streaming - select one of the options:

• enabled
• disabled

  4. Click Save to save the changes or Cancel to discard the changes.

The caching period of your CDN resources on edge servers is 60 minutes by default.

Please note that these cache settings will be overridden by the cache expiry set on the web origin (HTTP header) and the cache expiry setting at the CDN resource level.