Skip to content

//okhttp/okhttp3/CacheControl/noCache

noCache

[common]\ expect val noCache: Boolean

In a response, this field’s name "no-cache" is misleading. It doesn’t prevent us from caching the response; it only means we have to validate the response with the origin server before returning it. We can do this with a conditional GET.

In a request, it means do not use a cache to satisfy the request.

[jvm, nonJvm]\ [jvm]\

@get:JvmName(name = "noCache")

actual val noCache: Boolean

[nonJvm]\ actual val noCache: Boolean