downstream_​cache

Version: v2025-01-13Includes use: Yes

Behavior name: Downstream Cacheability

Specify the caching instructions the edge server sends to the end user's client or client proxies. By default, the cache's duration is whichever is less: the remaining lifetime of the edge cache, or what the origin's header specifies. If the origin is set to no-store or bypass-cache edge servers send cache-busting headers downstream to prevent downstream caching.

data "akamai_property_rules_builder" "downstream_cache" {
  rules_v2025_02_18 {
    name     = "Downstream Cacheability"
    comments = "Specify the caching instructions the edge server sends to an end user's client or client proxies."
    behavior {
      downstream_cache {
        behavior       = "ALLOW"
        allow_behavior = "LESSER"
        send_headers   = "CACHE_CONTROL_AND_EXPIRES"
        send_private   = false
      }
    }
  }
}
"behaviors": [
  {
    "name": "downstreamCache",
    "options": {
      "behavior": "ALLOW",
      "allowBehavior": "LESSER",
      "sendHeaders": "CACHE_CONTROL_AND_EXPIRES",
      "sendPrivate": false
    }
  }
]

Options

Option Description
behavior
Specify the caching instructions the edge server sends to the end user's client. Value is one of:
  • ALLOW. The value of allow_behavior chooses the caching method and headers to send to the client.
  • MUST_REVALIDATE. This equates to a Cache-Control: no-cache header, which allows caching but forces the client browser to send an if-modified-since request each time it requests the object.
  • BUST. Sends cache-busting headers downstream.
  • TUNNEL_ORIGIN. This passes Cache-Control and Expires headers from the origin to the downstream client.
  • NONE. Don't send any caching headers. Allow client browsers to cache content according to their own default settings.
allow_behavior
Specify how the edge server calculates the downstream cache by setting the value of the Expires header. Value is one of:
  • LESSER. Sends the lesser value of what the origin specifies and the edge cache's remaining duration. This is the default behavior.
  • GREATER. Sends the greater value of what the origin specifies and the edge cache's remaining duration.
  • REMAINING_LIFETIME. Sends the value of the edge cache's remaining duration, without comparing it to the origin's headers.
  • FROM_MAX_AGE. Sends the cache:max-age value applied to the object, without evaluating the cache's duration.
  • FROM_VALUE. Sends the value of the edge cache's duration.
  • PASS_ORIGIN. Sends the value of the origin's header, without evaluating the edge cache's duration.
ttl
Sets the duration of the cache. Setting the value to 0 equates to a no-cache header that forces revalidation.
send_headers
Specifies the HTTP headers to include in the response to the client. Value is one of:
  • CACHE_CONTROL_AND_EXPIRES. Sends both Cache-Control and Expires header.
  • CACHE_CONTROL. Sends only the origin's Cache-Control header.
  • EXPIRES. Sends only the origin's Expires header.
  • PASS_ORIGIN. Sends the same set of Cache-Control and Expires headers received from the origin.
send_private
Adds a Cache-Control: private header to prevent objects from being cached in a shared caching proxy.