- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 23 for cacheResponse (0.26 seconds)
The search processing time has exceeded the limit. The displayed results may be partial.
-
samples/guide/src/main/java/okhttp3/recipes/CacheResponse.java
System.out.println("Response 2 cache response: " + response2.cacheResponse()); System.out.println("Response 2 network response: " + response2.networkResponse()); } System.out.println("Response 2 equals Response 1? " + response1Body.equals(response2Body)); } public static void main(String... args) throws Exception { new CacheResponse(new File("CacheResponse.tmp")).run(); }
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Sun May 22 01:29:42 GMT 2016 - 2.4K bytes - Click Count (0) -
samples/guide/src/main/java/okhttp3/recipes/kt/CacheResponse.kt
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Wed Mar 19 19:25:20 GMT 2025 - 2K bytes - Click Count (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/cache/CacheInterceptor.kt
if (networkRequest == null) { return cacheResponse!! .newBuilder() .cacheResponse(cacheResponse.stripBody()) .build() .also { chain.eventListener.cacheHit(call, it) } } if (cacheResponse != null) { chain.eventListener.cacheConditionalHit(call, cacheResponse) } else if (cache != null) { chain.eventListener.cacheMiss(call)
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Sun Jan 11 12:06:21 GMT 2026 - 10.3K bytes - Click Count (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/Response.kt
checkSupportResponse("networkResponse", networkResponse) this.networkResponse = networkResponse } open fun cacheResponse(cacheResponse: Response?) = apply { checkSupportResponse("cacheResponse", cacheResponse) this.cacheResponse = cacheResponse } private fun checkSupportResponse( name: String, response: Response?, ) { response?.apply {
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Mon Jul 28 14:39:28 GMT 2025 - 18.1K bytes - Click Count (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/cache/CacheStrategy.kt
*/ private fun isFreshnessLifetimeHeuristic(): Boolean = cacheResponse!!.cacheControl.maxAgeSeconds == -1 && expires == null init { if (cacheResponse != null) { this.sentRequestMillis = cacheResponse.sentRequestAtMillis this.receivedResponseMillis = cacheResponse.receivedResponseAtMillis val headers = cacheResponse.headers for (i in 0 until headers.size) {Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Tue Jan 27 09:00:39 GMT 2026 - 12.1K bytes - Click Count (0) -
docs/features/caching.md
received followed by a cache hit or miss. Critically in the cache hit scenario the server won’t send the response body. The response will have non-null `cacheResponse` and `networkResponse`. The cacheResponse will be used as the top level response only if the response code is HTTP/1.1 304 Not Modified. - CallStart - **CacheConditionalHit** - ConnectionAcquired - ... Standard Events...
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Sun Mar 15 09:01:42 GMT 2026 - 3.1K bytes - Click Count (1) -
docs/recipes.md
[CacheResponseJava]: https://github.com/square/okhttp/blob/master/samples/guide/src/main/java/okhttp3/recipes/CacheResponse.java [CacheResponseKotlin]: https://github.com/square/okhttp/blob/master/samples/guide/src/main/java/okhttp3/recipes/kt/CacheResponse.kt [CancelCallJava]: https://github.com/square/okhttp/blob/master/samples/guide/src/main/java/okhttp3/recipes/CancelCall.java
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Sun Mar 15 09:01:42 GMT 2026 - 47.8K bytes - Click Count (0) -
okhttp/src/jvmTest/kotlin/okhttp3/KotlinDeprecationErrorTest.kt
val headers: Headers = response.headers() val body: ResponseBody = response.body() val networkResponse: Response? = response.networkResponse() val cacheResponse: Response? = response.cacheResponse() val priorResponse: Response? = response.priorResponse() val cacheControl: CacheControl = response.cacheControl() val sentRequestAtMillis: Long = response.sentRequestAtMillis()
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Fri Dec 27 13:39:56 GMT 2024 - 13.3K bytes - Click Count (0) -
docs/changelogs/upgrading_to_okhttp_4.md
* **PushPromise**: headers, method, path, response * **Request**: body, cacheControl, headers, method, url * **Response**: body, cacheControl, cacheResponse, code, handshake, headers, message, networkResponse, priorResponse, protocol, receivedResponseAtMillis, request, sentRequestAtMillis * **Route**: address, proxy, socketAddress * **TlsVersion**: javaName
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Sun Feb 06 16:58:16 GMT 2022 - 10.9K bytes - Click Count (0) -
okhttp/src/jvmTest/kotlin/okhttp3/KotlinSourceModernTest.kt
val builder: Response.Builder = response.newBuilder() val redirect: Boolean = response.isRedirect val networkResponse: Response? = response.networkResponse val cacheResponse: Response? = response.cacheResponse val priorResponse: Response? = response.priorResponse val challenges: List<Challenge> = response.challenges() val cacheControl: CacheControl = response.cacheControl
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Tue Mar 10 21:47:20 GMT 2026 - 49.7K bytes - Click Count (0)