- Sort Score
- Result 10 results
- Languages All
Results 1 - 7 of 7 for networkCount (0.21 sec)
-
okhttp/src/test/java/okhttp3/CacheCorruptionTest.kt
it.replace("TLS_", "SLT_") } } assertThat(response.body.string()).isEqualTo("ABC.1") // cached assertThat(cache.requestCount()).isEqualTo(2) assertThat(cache.networkCount()).isEqualTo(1) assertThat(cache.hitCount()).isEqualTo(1) assertThat(response.handshake!!.cipherSuite.javaName).startsWith("SLT_") } @Test fun truncatedMetadataEntry() {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Jan 20 10:30:28 UTC 2024 - 6K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/Cache.kt
networkCount++ } else if (cacheStrategy.cacheResponse != null) { // This response uses the cache and not the network. That's a cache hit. hitCount++ } } @Synchronized internal fun trackConditionalCacheHit() { hitCount++ } @Synchronized fun networkCount(): Int = networkCount @Synchronized fun hitCount(): Int = hitCount
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Wed Apr 10 19:46:48 UTC 2024 - 26.8K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/CacheTest.kt
assertThat(cache.requestCount()).isEqualTo(1) assertThat(cache.networkCount()).isEqualTo(1) assertThat(cache.hitCount()).isEqualTo(0) assertThat(get(server.url("/")).body.string()).isEqualTo("B") assertThat(get(server.url("/")).body.string()).isEqualTo("C") assertThat(cache.requestCount()).isEqualTo(3) assertThat(cache.networkCount()).isEqualTo(3) assertThat(cache.hitCount()).isEqualTo(0) }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Wed Apr 10 19:46:48 UTC 2024 - 108.6K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/http2/HttpOverHttp2Test.kt
assertThat(cache.requestCount()).isEqualTo(1) assertThat(cache.networkCount()).isEqualTo(1) assertThat(cache.hitCount()).isEqualTo(0) val call2 = client.newCall(Request(server.url("/"))) val response2 = call2.execute() assertThat(response2.body.string()).isEqualTo("A") assertThat(cache.requestCount()).isEqualTo(2) assertThat(cache.networkCount()).isEqualTo(2) assertThat(cache.hitCount()).isEqualTo(1) }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Thu Apr 11 22:09:35 UTC 2024 - 75.3K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/KotlinSourceModernTest.kt
val size: Long = cache.size() val maxSize: Long = cache.maxSize() cache.flush() cache.close() val directory: File = cache.directory val networkCount: Int = cache.networkCount() val hitCount: Int = cache.hitCount() val requestCount: Int = cache.requestCount() } @Test fun cacheControl() {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Apr 01 14:21:25 UTC 2024 - 46.5K bytes - Viewed (0) -
android-test/src/androidTest/java/okhttp/android/test/OkHttpTest.kt
assertEquals(200, it.code) assertNotNull(it.cacheResponse) assertNull(it.networkResponse) } assertEquals(1, cache.hitCount()) assertEquals(1, cache.networkCount()) assertEquals(2, cache.requestCount()) } finally { cache.delete() } } private fun OkHttpClient.get(url: String) { val request = Request.Builder().url(url).build()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Jan 20 10:30:28 UTC 2024 - 27K bytes - Viewed (0) -
okhttp/api/okhttp.api
public final fun hitCount ()I public final fun initialize ()V public final fun isClosed ()Z public static final fun key (Lokhttp3/HttpUrl;)Ljava/lang/String; public final fun maxSize ()J public final fun networkCount ()I public final fun requestCount ()I public final fun size ()J public final fun urls ()Ljava/util/Iterator; public final fun writeAbortCount ()I public final fun writeSuccessCount ()I }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Apr 15 13:41:01 UTC 2024 - 70.2K bytes - Viewed (0)