Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 25 of 25 for cacheResponse (0.04 sec)

  1. okhttp/src/jvmTest/kotlin/okhttp3/CacheTest.kt

        val request = Request(server.url("/abc"))
    
        val response = testBasicCachingRules(request)
    
        assertThat(response.request.url).isEqualTo(request.url)
        assertThat(response.cacheResponse!!.request.url).isEqualTo(request.url)
      }
    
      @Test
      fun postWithOverrideResponse() {
        val url = server.url("/abc?token=123")
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Fri Oct 03 17:41:45 UTC 2025
    - 116.8K bytes
    - Viewed (0)
  2. okhttp-logging-interceptor/src/main/kotlin/okhttp3/logging/LoggingEventListener.kt

      }
    
      override fun cacheMiss(call: Call) {
        logWithTime("cacheMiss")
      }
    
      override fun cacheConditionalHit(
        call: Call,
        cachedResponse: Response,
      ) {
        logWithTime("cacheConditionalHit: $cachedResponse")
      }
    
      private fun logWithTime(message: String) {
        val timeMs = TimeUnit.NANOSECONDS.toMillis(System.nanoTime() - startNs)
        logger.log("[$timeMs ms] $message")
      }
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Mon Oct 06 13:40:20 UTC 2025
    - 5.8K bytes
    - Viewed (0)
  3. okhttp/src/commonJvmAndroid/kotlin/okhttp3/EventListener.kt

            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,
          retry: Boolean,
        ) {
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Tue Oct 07 21:03:04 UTC 2025
    - 24.9K bytes
    - Viewed (0)
  4. okhttp-testing-support/src/main/kotlin/okhttp3/EventListenerAdapter.kt

      override fun cacheHit(
        call: Call,
        response: Response,
      ) = onEvent(CacheHit(System.nanoTime(), call))
    
      override fun cacheConditionalHit(
        call: Call,
        cachedResponse: Response,
      ) = onEvent(CacheConditionalHit(System.nanoTime(), call))
    
      override fun retryDecision(
        call: Call,
        exception: IOException,
        retry: Boolean,
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Tue Nov 04 19:13:52 UTC 2025
    - 7.1K bytes
    - Viewed (0)
  5. okhttp-testing-support/src/main/kotlin/okhttp3/ClientRuleEventListener.kt

      }
    
      override fun cacheHit(
        call: Call,
        response: Response,
      ) {
        logWithTime("cacheHit")
      }
    
      override fun cacheConditionalHit(
        call: Call,
        cachedResponse: Response,
      ) {
        logWithTime("cacheConditionalHit")
      }
    
      override fun retryDecision(
        call: Call,
        exception: IOException,
        retry: Boolean,
      ) {
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Tue Oct 07 21:03:04 UTC 2025
    - 5.4K bytes
    - Viewed (0)
Back to top