- Sort Score
- Result 10 results
- Languages All
Results 1 - 6 of 6 for modifiers (0.21 sec)
-
okhttp/src/main/kotlin/okhttp3/Cache.kt
* the response, the client will issue a conditional `GET`. The server will then send either * the updated response if it has changed, or a short 'not modified' response if the client's copy * is still valid. Such responses increment both the network count and hit count. * * The best way to improve the cache hit rate is by configuring the web server to return cacheable
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Wed Apr 10 19:46:48 GMT 2024 - 26.8K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/CallTest.kt
), body = "A", ), ) server.enqueue( MockResponse.Builder() .clearHeaders() .addHeader("Donut: b") .code(HttpURLConnection.HTTP_NOT_MODIFIED) .build(), ) client = client.newBuilder() .cache(cache) .build() // Store a response in the cache.
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Wed Apr 10 19:46:48 GMT 2024 - 142.5K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/cache/CacheInterceptor.kt
* limitations under the License. */ package okhttp3.internal.cache import java.io.IOException import java.net.HttpURLConnection.HTTP_GATEWAY_TIMEOUT import java.net.HttpURLConnection.HTTP_NOT_MODIFIED import java.util.concurrent.TimeUnit.MILLISECONDS import okhttp3.Cache import okhttp3.EventListener import okhttp3.Headers import okhttp3.Interceptor import okhttp3.Protocol import okhttp3.Request
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Fri Mar 22 07:09:21 GMT 2024 - 10.2K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/http2/HttpOverHttp2Test.kt
server.enqueue( MockResponse( headers = headersOf("ETag", "v1"), body = "A", ), ) server.enqueue( MockResponse(code = HttpURLConnection.HTTP_NOT_MODIFIED), ) val call1 = client.newCall(Request(server.url("/"))) val response1 = call1.execute() assertThat(response1.body.string()).isEqualTo("A") assertThat(cache.requestCount()).isEqualTo(1)
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Thu Apr 11 22:09:35 GMT 2024 - 75.3K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/CacheTest.kt
MockResponse.Builder() .addHeader("Last-Modified: $lastModifiedDate") .addHeader("Date: " + formatDate(-15, TimeUnit.SECONDS)) .build(), ) assertThat(conditionalRequest.headers["If-Modified-Since"]) .isEqualTo(lastModifiedDate) } @Test fun defaultExpirationDateFullyCachedForMoreThan24Hours() { // last modified: 105 days ago // served: 5 days ago
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Wed Apr 10 19:46:48 GMT 2024 - 108.6K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/cache/CacheStrategy.kt
conditionValue = etag } lastModified != null -> { conditionName = "If-Modified-Since" conditionValue = lastModifiedString } servedDate != null -> { conditionName = "If-Modified-Since" conditionValue = servedDateString }
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Apr 15 13:24:48 GMT 2024 - 12K bytes - Viewed (0)