CacheStorage

interface CacheStorage(source)

Cache storage interface.

Report a problem

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open suspend fun clear()

Removes all entries from this cache storage.

Link copied to clipboard
abstract suspend fun find(url: Url, varyKeys: Map<String, String>): CachedResponseData?

Find valid entry in cache storage with additional varyKeys.

Link copied to clipboard
abstract suspend fun findAll(url: Url): Set<CachedResponseData>

Find all matched HttpCacheEntry for url.

Link copied to clipboard
abstract suspend fun remove(url: Url, varyKeys: Map<String, String>)

Remove from cache storage the entry matching url with additional varyKeys.

Link copied to clipboard
abstract suspend fun removeAll(url: Url)

Remove all matched HttpCacheEntry for url.

Link copied to clipboard
abstract suspend fun store(url: Url, data: CachedResponseData)

Store data in cache storage for url key.

Link copied to clipboard

Store response in cache storage.

suspend fun CacheStorage.store(response: HttpResponse, varyKeys: Map<String, String>, isShared: Boolean = false): CachedResponseData

Store response with varyKeys in cache storage.