cache_​redirect

Version: v2025-02-18Includes use: Yes

Behavior name: Cache HTTP Temporary Redirects

Controls the caching of HTTP 302 and 307 temporary redirects. By default, Akamai edge servers don't cache them. Enabling this behavior instructs edge servers to allow these redirects to be cached the same as HTTP 200 responses.

Use the caching behavior to separately control TTL for these redirects, either with a specific TTL value or based on Cache-Control or Expires response headers.

Default behavior

These samples reflect the behavior's default settings. You can use these as is in your configurations or make adjustments based on the behavior's available options.

data "akamai_property_rules_builder" "cache_redirect" {
  rules_v2025_02_18 {
    name     = "Cache HTTP Temporary Redirects"
    comments = "Controls the caching of HTTP 302 and 307 temporary redirects."
    behavior {
      cache_redirect {
        enabled = true
      }
    }
  }
}
"behaviors": [
  {
    "name": "cacheRedirect",
    "options": {
      "enabled": "true"
    }
  }
]

Options

Option Description
enabled
Enables the redirect caching behavior.