CachingConfig

sttp.client4.caching.CachingConfig
See theCachingConfig companion class
object CachingConfig

Attributes

Companion
class
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type

Members list

Type members

Inherited and Abstract types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Attributes

Inherited from:
Mirror
type MirroredLabel <: String

The name of the type

The name of the type

Attributes

Inherited from:
Mirror

Value members

Concrete fields

val CacheDurationFromCacheDirectives: (RequestMetadata, ResponseMetadata) => Option[FiniteDuration]

Default caching config. Caching happens when:

Default caching config. Caching happens when:

  • the request is a GET or HEAD request
  • the response contains a Cache-Control header with a max-age directive; the response is cached for the duration specified in this directive

Responses are stored in the cache, serialized to JSON using jsoniter-scala.

Attributes

val DefaultCacheKey: RequestMetadata => Array[Byte]
val DeserializeResponseFromJson: (Array[Byte]) => Try[CachedResponse]
val EligibleWhenMethodIsGetOrHead: RequestMetadata => Boolean