maxAge

Sets the maximum age of a cached response. If the cache response's age exceeds maxAge, it will not be used and a network request will be made.

Parameters

maxAge

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


fun maxAge(maxAge: Int, timeUnit: <Error class: unknown class>): CacheControl.Builder

Sets the maximum age of a cached response. If the cache response's age exceeds maxAge, it will not be used and a network request will be made.

Parameters

maxAge

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