October 24, 2018

Edge Cache Expiration

  Caching, Zone Management

     

Edge Cache Expiration controls how long to tell the CDN's edge server to cache static resources from your website. The headers set by this setting are not sent to browsers. Generally this should be set to the same value as the Browser Cache Expiration setting.

For the purposes of this setting, a static resource is any resource with one of the following Content-Types or file extensions:

Content-Types
  • text/html
  • font/*
  • image/*
  • text/css
  • application/x-javascript
  • application/javascript
  • text/javascript
  • text/csv
  • application/msword
  • application/vnd.openxmlformats-officedocument.wordprocessingml.document
  • application/pls+xml
  • application/pdf
  • application/vnd.ms-powerpoint
  • application/vnd.openxmlformats-officedocument.presentationml.presentation
  • application/vnd.ms-excel
  • application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
  • application/postscript
  • application/x-shockwave-flash
  • */x-midi
  • application/java
  • application/java-byte-code
  • application/x-java-class
  • application/java-archive
File Extensions
  • .css
  • .js
  • .ejs
  • .jpg
  • .jpeg
  • .gif
  • .ico
  • .png
  • .bmp
  • .pict
  • .tif
  • .tiff
  • .svg
  • .svgz
  • .webp
  • .csv
  • .doc
  • .pdf
  • .pls
  • .ppt
  • .docx
  • .xlsx
  • .xls
  • .pptx
  • .ps
  • .eps
  • .ttf
  • .eot
  • .woff
  • .woff2
  • .otf
  • .midi
  • .mid
  • .swf
  • .class
  • .jar

Equivalent Server Headers

If the resource is a static resource and the status code of the response from your server is 200 OK, this setting sets the following headers on the resource:

Surrogate-Control: public, max-age=SETTING_TTL_IN_SECONDS

Otherwise the following headers are set to tell the edge server not to cache the resource:

Surrogate-Control: max-age=0, must-revalidate

If these headers are not appropriate for your use case or want to cache (or not cache) additional content types or status codes, you can set this option to Respect Existing Headers, and then configure your server to set the appropriate cache headers.