Package-level declarations

Types

Link copied to clipboard
class CachedResponseData(val url: Url, val statusCode: HttpStatusCode, val requestTime: GMTDate, val responseTime: GMTDate, val version: HttpProtocolVersion, val expires: GMTDate, val headers: Headers, val varyKeys: Map<String, String>, val body: ByteArray)

Cached representation of response

Link copied to clipboard
interface CacheStorage

Cache storage interface.

Link copied to clipboard
abstract class HttpCacheStorage

Cache storage interface.

Functions

Link copied to clipboard
fun FileStorage(directory: File, dispatcher: CoroutineDispatcher = Dispatchers.IO): CacheStorage

Creates storage that uses file system to store cache data.

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.