Class HttpRequestCacheConfiguration
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<HttpRequestCacheConfiguration.Builder,HttpRequestCacheConfiguration>
The optional response-caching configuration shared by the HTTP-based function types (HTTP_REQUEST,
AWS_SERVICE_REQUEST, and VAST_REQUEST). When you provide this configuration, MediaTailor
caches the function's responses that have one of the following HTTP status codes: 200, 203,
204, 404, 405, 410, 414, and 501. For a
cacheable response, MediaTailor caches it for the number of seconds given by the response's
Cache-Control max-age directive, limited to the range between
TtlMinimumSeconds and TtlMaximumSeconds. If the response has no Cache-Control
max-age directive, MediaTailor caches it for TtlMinimumSeconds seconds. Cached HTTP
responses are scoped per playback configuration, not per function.
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionbuilder()final booleanfinal booleanequalsBySdkFields(Object obj) Indicates whether some other object is "equal to" this one by SDK fields.final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz) final inthashCode()final Stringkey()A JSONata expression that MediaTailor evaluates to a custom cache key.static Class<? extends HttpRequestCacheConfiguration.Builder> Take this object and create a builder that contains all of the current property values of this object.final StringtoString()Returns a string representation of this object.final IntegerThe upper bound, in seconds, on how long MediaTailor caches a response.final IntegerThe lower bound, in seconds, on how long MediaTailor caches a response.Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
Method Details
-
ttlMinimumSeconds
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-Controlmax-agedirective.- Returns:
- 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-Controlmax-agedirective.
-
ttlMaximumSeconds
The upper bound, in seconds, on how long MediaTailor caches a response. This value must be greater than or equal to
TtlMinimumSeconds.- Returns:
- The upper bound, in seconds, on how long MediaTailor caches a response. This value must be greater than
or equal to
TtlMinimumSeconds.
-
key
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.
- Returns:
- 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.
-
toBuilder
Description copied from interface:ToCopyableBuilderTake this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilderin interfaceToCopyableBuilder<HttpRequestCacheConfiguration.Builder,HttpRequestCacheConfiguration> - Returns:
- a builder for type T
-
builder
-
serializableBuilderClass
-
hashCode
-
equals
-
equalsBySdkFields
Description copied from interface:SdkPojoIndicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in anSdkPojoclass, and is generated based on a service model.If an
SdkPojoclass does not have any inherited fields,equalsBySdkFieldsandequalsare essentially the same.- Specified by:
equalsBySdkFieldsin interfaceSdkPojo- Parameters:
obj- the object to be compared with- Returns:
- true if the other object equals to this object by sdk fields, false otherwise.
-
toString
-
getValueForField
-
sdkFields
-
sdkFieldNameToField
- Specified by:
sdkFieldNameToFieldin interfaceSdkPojo- Returns:
- The mapping between the field name and its corresponding field.
-