Interface HttpRequestCacheConfiguration.Builder

  • Method Details

    • ttlMinimumSeconds

      HttpRequestCacheConfiguration.Builder ttlMinimumSeconds(Integer 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-Control max-age directive.

      Parameters:
      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-Control max-age directive.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • ttlMaximumSeconds

      HttpRequestCacheConfiguration.Builder ttlMaximumSeconds(Integer ttlMaximumSeconds)

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

      Parameters:
      ttlMaximumSeconds - The upper bound, in seconds, on how long MediaTailor caches a response. This value must be greater than or equal to TtlMinimumSeconds.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • 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.

      Parameters:
      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:
      Returns a reference to this object so that method calls can be chained together.