- Sort Score
- Result 10 results
- Languages All
Results 1 - 7 of 7 for cacheHit (0.05 sec)
-
okhttp/src/main/kotlin/okhttp3/internal/cache/CacheInterceptor.kt
// If we don't need the network, we're done. if (networkRequest == null) { return cacheResponse!!.newBuilder() .cacheResponse(cacheResponse.stripBody()) .build().also { listener.cacheHit(call, it) } } if (cacheResponse != null) { listener.cacheConditionalHit(call, cacheResponse) } else if (cache != null) { listener.cacheMiss(call) }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Fri Mar 22 07:09:21 UTC 2024 - 10.2K bytes - Viewed (0) -
okhttp-logging-interceptor/src/test/java/okhttp3/logging/LoggingEventListenerTest.kt
listener.cacheConditionalHit(call, response) listener.cacheHit(call, response) listener.cacheMiss(call) listener.satisfactionFailure(call, response) logRecorder .assertLogMatch(Regex("""cacheConditionalHit: Response\{protocol=h2, code=200, message=, url=$url\}""")) .assertLogMatch(Regex("""cacheHit: Response\{protocol=h2, code=200, message=, url=$url\}"""))
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sun Jan 14 10:20:09 UTC 2024 - 10.2K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/EventListener.kt
* Response and normal event sequences will not be received. * * This event will only be received when a Cache is configured for the client. */ open fun cacheHit( call: Call, response: Response, ) { } /** * Invoked when a response will be served from the network. The Response will be * available from normal event sequences. *
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 15.2K bytes - Viewed (0) -
docs/changelogs/changelog_4x.md
.build() val client = OkHttpClient.Builder() .sslSocketFactory(clientCertificates.sslSocketFactory(), clientCertificates.trustManager) .build() ``` * New: Add `cacheHit`, `cacheMiss`, and `cacheConditionalHit()` events to `EventListener`. Use these in logs, metrics, and even test cases to confirm your cache headers are configured as expected.
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Wed Apr 17 13:25:31 UTC 2024 - 25.2K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/Cache.kt
private inner class RealCacheRequest( private val editor: DiskLruCache.Editor, ) : CacheRequest { private val cacheOut: Sink = editor.newSink(ENTRY_BODY) private val body: Sink var done = false init { this.body = object : ForwardingSink(cacheOut) { @Throws(IOException::class) override fun close() { synchronized(this@Cache) {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Wed Apr 10 19:46:48 UTC 2024 - 26.8K bytes - Viewed (0) -
cmd/xl-storage-disk-id-check.go
} info, err = p.storage.DiskInfo(ctx, opts) if err != nil { return info, err } // check cached diskID against backend // only if its non-empty. cachedID := *p.diskID.Load() if cachedID != "" && cachedID != info.ID { return info, errDiskNotFound } return info, nil } func (p *xlStorageDiskIDCheck) MakeVolBulk(ctx context.Context, volumes ...string) (err error) {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sat Oct 26 09:56:26 UTC 2024 - 34.5K bytes - Viewed (0) -
android-test/src/androidTest/java/okhttp/android/test/OkHttpTest.kt
server.enqueue(MockResponse(body = "abc")) val ctxt = InstrumentationRegistry.getInstrumentation().targetContext.applicationContext val cacheSize = 1L * 1024 * 1024 // 1MB val cache = Cache(ctxt.cacheDir.resolve("testCache"), cacheSize) try { client = client.newBuilder() .cache(cache) .build() val request = Request.Builder()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Jan 20 10:30:28 UTC 2024 - 27K bytes - Viewed (0)