okhttp / okhttp3 / CacheControl / Builder / maxStale

maxStale

fun maxStale(maxStale: Int, timeUnit: TimeUnit): CacheControl.Builder

Accept cached responses that have exceeded their freshness lifetime by up to maxStale. If unspecified, stale cache responses will not be used.

Parameters

maxStale - a non-negative integer. This is stored and transmitted with TimeUnit.SECONDS precision; finer precision will be lost.