TimeToLive

data class TimeToLive(val sizeLimit: Long, val maxAge: Duration) : ResourceCachePolicy

A policy that specifies maximum amount of time that fetched resource should be allowed to remain in cache. Caching is also subject to server control if, ex. http response contains cache-control header with directive that forbids caching.

Constructors

Link copied to clipboard
fun TimeToLive(sizeLimit: Long, maxAge: Duration)

Functions

Link copied to clipboard
abstract fun describeContents(): Int
Link copied to clipboard
abstract fun writeToParcel(p0: Parcel, p1: Int)

Properties

Link copied to clipboard
val maxAge: Duration

Default entries lifetime that should be used if server does not provide any.

Link copied to clipboard
val sizeLimit: Long

Cache size limit in bytes.