Skip to content

HttpRequestCacheConfiguration

Source code in docs_src/capo_mediatailor/types/http_request_cache_configuration.py
class HttpRequestCacheConfiguration(TypedDict, closed=True):
    ttl_minimum_seconds: "capo_mediatailor.types.__integer_min1.__integerMin1"
    """<p>The lower bound, in seconds, on how long MediaTailor caches a response. MediaTailor also uses this value as the cache duration when a response has no <code>Cache-Control</code> <code>max-age</code> directive.</p>"""
    ttl_maximum_seconds: "capo_mediatailor.types.__integer_min1.__integerMin1"
    """<p>The upper bound, in seconds, on how long MediaTailor caches a response. This value must be greater than or equal to <code>TtlMinimumSeconds</code>.</p>"""
    key: NotRequired["capo_mediatailor.types.__string.__string"]
    """<p>A JSONata expression that MediaTailor evaluates to a custom cache key. By default, the cache key is a hash of the HTTP URL, the request body, and the HTTP method; request headers are not included. You can specify a custom cache key expression to vary caching by request headers and more. The evaluated key must be smaller than 1 KB; otherwise the HTTP function will fail.</p>"""

key instance-attribute

key: NotRequired[__string]

A JSONata expression that MediaTailor evaluates to a custom cache key. By default, the cache key is a hash of the HTTP URL, the request body, and the HTTP method; request headers are not included. You can specify a custom cache key expression to vary caching by request headers and more. The evaluated key must be smaller than 1 KB; otherwise the HTTP function will fail.

ttl_maximum_seconds instance-attribute

ttl_maximum_seconds: __integerMin1

The upper bound, in seconds, on how long MediaTailor caches a response. This value must be greater than or equal to TtlMinimumSeconds.

ttl_minimum_seconds instance-attribute

ttl_minimum_seconds: __integerMin1

The lower bound, in seconds, on how long MediaTailor caches a response. MediaTailor also uses this value as the cache duration when a response has no Cache-Control max-age directive.