CacheStorage

interface CacheStorage

Cache storage interface.

Types

Link copied to clipboard
object Companion

Functions

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 store(url: Url, data: CachedResponseData)

Store value 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.