caching

This behavior configures the time-to-live (TTL) settings. Use proper match conditions to alter the TTL for different types of content. For example, images might use a 365 day TTL, where JS and CSS files might only be cached for one day. Combine path and file-extension matches as needed to achieve the desired cache settings.

Any of the below is valid in type.
  • no-store – the response must never be cached. If a prior rule has allowed the object to be cached, this setting will evict the cache entry.
  • bypass-cache – A cached response must not be used to satisfy the current request, or the current response must not be cached. If a prior rule has allowed the object to be cached, this setting will evict the cache entry.
  • fixed – The response is cacheable and may be cached for the amount of time specified in the "value" parameter.
  • honor - The response may be cacheable, subject to the origin Cache-Control and/or Expires response headers. If the object is found in cache it may be used to satisfy the current request. If the origin does not provide either Cache-Control or Expires in its response, then the object may be cached for the amount of time specified in the "value" parameter. If the Cache-Control header provides a "no-store" or "no-cache" directive, then the edge server must not cache the response.
  • honor-cc - The response may be cacheable, subject to the origin Cache-Control response header only. If the object is found in cache it may be used to satisfy the current request. If the origin does not provide a Cache-Control header in its response, then the object may be cached for the amount of time specified in the "value" parameter. If the Cache-Control header provides a "no-store" or "no-cache" directive, then the edge server must not cache the response.
  • honor-expires - The response may be cacheable, subject to the origin Expires response header only. If the object is found in cache it may be used to satisfy the current request. If the origin does not provide an Expires directive in its response, then the object may be cached for the amount of time specified in the "value" parameter. If the Expires header provides an RFC 2616 time string in the past (or "-1" as is common practice to prevent downstream caching), then the Edge server must not cache the response.

The value parameter uses DeltaTime, and displayed the number of seconds elapsed. The available units are seconds (s), minutes (m), hours (h), and days (d). The following example rule sets a 30 day TTL for all content served from within the "/static/*" URI path:


     "matches": [
       {
         "name": "url-wildcard",
         "value": "/static/*"
       }
     ],
     "behaviors": [
       {
         "name": "caching",
         "type": "fixed",
         "value": "30d"
       }
     ]
   

Note that the Akamai platform supports an "Edge-Control" origin response header that can be used to override these TTL settings.