Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for CacheConditionalHit (0.06 sec)

  1. okhttp-logging-interceptor/src/test/java/okhttp3/logging/LoggingEventListenerTest.kt

            .build()
        val listener = loggingEventListenerFactory.create(call)
        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\}"""))
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Fri Jun 20 11:46:46 UTC 2025
    - 10.2K bytes
    - Viewed (0)
  2. okhttp/src/commonJvmAndroid/kotlin/okhttp3/EventListener.kt

          for (delegate in eventListeners) {
            delegate.cacheMiss(call)
          }
        }
    
        override fun cacheConditionalHit(
          call: Call,
          cachedResponse: Response,
        ) {
          for (delegate in eventListeners) {
            delegate.cacheConditionalHit(call, cachedResponse)
          }
        }
    
        override fun retryDecision(
          call: Call,
          exception: IOException,
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Tue Oct 07 21:03:04 UTC 2025
    - 24.9K bytes
    - Viewed (0)
  3. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/cache/CacheInterceptor.kt

            .cacheResponse(cacheResponse.stripBody())
            .build()
            .also {
              call.eventListener.cacheHit(call, it)
            }
        }
    
        if (cacheResponse != null) {
          call.eventListener.cacheConditionalHit(call, cacheResponse)
        } else if (cache != null) {
          call.eventListener.cacheMiss(call)
        }
    
        var networkResponse: Response? = null
        try {
          networkResponse = chain.proceed(networkRequest)
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Wed Nov 05 18:28:35 UTC 2025
    - 10.3K bytes
    - Viewed (0)
  4. docs/changelogs/changelog_4x.md

        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 Dec 26 11:42:13 UTC 2025
    - Last Modified: Wed Apr 17 13:25:31 UTC 2024
    - 25.2K bytes
    - Viewed (0)
Back to top