HttpCacheStorage

abstract class HttpCacheStorage

Cache storage interface.

Constructors

<init>

HttpCacheStorage()

Cache storage interface.

Functions

find

abstract fun find(
    url: Url,
    varyKeys: Map<String, String>
): HttpCacheEntry?

Find valid entry in cache storage with additional varyKeys.

findByUrl

abstract fun findByUrl(url: Url): Set<HttpCacheEntry>

Find all matched HttpCacheEntry for url.

store

abstract fun store(url: Url, value: HttpCacheEntry): Unit

Store value in cache storage for url key.

Companion Object Properties

Disabled

val Disabled: HttpCacheStorage

Disabled cache always empty and store nothing.

Unlimited

val Unlimited: () -> HttpCacheStorage

Default unlimited cache storage.