HttpCache

class HttpCache

This feature allow to use HTTP cache.

For detailed description follow: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control

Types

Companion

companion object Companion : 
    HttpClientFeature<Config, HttpCache>

Config

class Config

HttpCache configuration.

Constructors

<init>

HttpCache(
    publicStorage: HttpCacheStorage,
    privateStorage: HttpCacheStorage)

This feature allow to use HTTP cache.

Properties

privateStorage

val privateStorage: HttpCacheStorage

publicStorage

val publicStorage: HttpCacheStorage

Companion Object Properties

key

The AttributeKey for this feature.

Companion Object Functions

install

fun install(feature: HttpCache, scope: HttpClient): Unit

Installs the feature class for a HttpClient defined at scope.

prepare

fun prepare(block: Config.() -> Unit): HttpCache

Builds a TFeature by calling the block with a TConfig config instance as receiver.