Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 23 for cacheControl (0.05 sec)

  1. okhttp/api/jvm/okhttp.api

    	public final fun maxStale (ILjava/util/concurrent/TimeUnit;)Lokhttp3/CacheControl$Builder;
    	public final fun maxStale-LRDsOJo (J)Lokhttp3/CacheControl$Builder;
    	public final fun minFresh (ILjava/util/concurrent/TimeUnit;)Lokhttp3/CacheControl$Builder;
    	public final fun minFresh-LRDsOJo (J)Lokhttp3/CacheControl$Builder;
    	public final fun noCache ()Lokhttp3/CacheControl$Builder;
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 16 09:39:51 UTC 2025
    - 69.4K bytes
    - Viewed (0)
  2. okhttp/src/jvmTest/kotlin/okhttp3/RequestTest.kt

      }
    
      @Test
      fun cacheControl() {
        val request =
          Request
            .Builder()
            .cacheControl(CacheControl.Builder().noCache().build())
            .url("https://square.com")
            .build()
        assertThat(request.headers("Cache-Control")).containsExactly("no-cache")
        assertThat(request.cacheControl.noCache).isTrue()
      }
    
      @Test
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 16 09:39:51 UTC 2025
    - 19K bytes
    - Viewed (0)
  3. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/-CacheControlCommon.kt

        else -> toInt()
      }
    
    internal fun CacheControl.Companion.commonForceNetwork() =
      CacheControl
        .Builder()
        .noCache()
        .build()
    
    internal fun CacheControl.Companion.commonForceCache() =
      CacheControl
        .Builder()
        .onlyIfCached()
        .maxStale(Int.MAX_VALUE.seconds)
        .build()
    
    internal fun CacheControl.Builder.commonBuild(): CacheControl =
      CacheControl(
        noCache = noCache,
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 7.2K bytes
    - Viewed (0)
  4. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/cache/CacheStrategy.kt

              // s-maxage is not checked because OkHttp is a private cache that should ignore s-maxage.
              if (response.header("Expires") == null &&
                response.cacheControl.maxAgeSeconds == -1 &&
                !response.cacheControl.isPublic &&
                !response.cacheControl.isPrivate
              ) {
                return false
              }
            }
    
            else -> {
              // All other codes cannot be cached.
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 12K bytes
    - Viewed (0)
  5. docs/changelogs/upgrading_to_okhttp_4.md

       readTimeoutMillis, retryOnConnectionFailure, socketFactory, sslSocketFactory, writeTimeoutMillis
     * **PushPromise**: headers, method, path, response
     * **Request**: body, cacheControl, headers, method, url
     * **Response**: body, cacheControl, cacheResponse, code, handshake, headers, message,
       networkResponse, priorResponse, protocol, receivedResponseAtMillis, request, sentRequestAtMillis
     * **Route**: address, proxy, socketAddress
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sun Feb 06 16:58:16 UTC 2022
    - 10.9K bytes
    - Viewed (0)
  6. android-test/src/androidTest/java/okhttp/android/test/OkHttpTest.kt

            .use {
              assertEquals(200, it.code)
              assertNull(it.cacheResponse)
              assertNotNull(it.networkResponse)
    
              assertEquals(3, it.cacheControl.maxAgeSeconds)
              assertTrue(it.cacheControl.isPublic)
            }
    
          client
            .newCall(request)
            .execute()
            .use {
              assertEquals(200, it.code)
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 02 14:12:28 UTC 2025
    - 29K bytes
    - Viewed (0)
  7. okhttp/src/jvmTest/kotlin/okhttp3/EventListenerTest.kt

      @Test
      fun satisfactionFailure() {
        enableCache()
        val call =
          client.newCall(
            Request
              .Builder()
              .url(server.url("/"))
              .cacheControl(CacheControl.FORCE_CACHE)
              .build(),
          )
        val response = call.execute()
        assertThat(response.code).isEqualTo(504)
        response.close()
        assertThat(listener.recordedEventTypes())
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Jun 20 11:46:46 UTC 2025
    - 60.4K bytes
    - Viewed (0)
  8. docs/changelogs/changelog_1x.md

    ##### Changes
    
     * New: Support for `HTTP-draft-09/2.0`.
     * New: Support for `spdy/3.1`. Dropped support for `spdy/3`.
     * New: Use ALPN on Android platforms that support it (4.4+)
     * New: CacheControl model and parser.
     * New: Protocol selection in MockWebServer.
     * Fix: Route selection shouldn't use TLS modes that we know will fail.
     * Fix: Cache SPDY responses even if the response body is closed prematurely.
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sun Feb 06 02:19:09 UTC 2022
    - 6.4K bytes
    - Viewed (0)
  9. docs/recipes.md

          }
        ```
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 30 17:01:12 UTC 2025
    - 47.8K bytes
    - Viewed (0)
  10. okhttp/src/androidMain/baseline-prof.txt

    HSPLokhttp3/Authenticator;-><clinit>()V
    HSPLokhttp3/Cache;-><init>(Ljava/io/File;J)V
    HSPLokhttp3/CacheControl$Companion;-><init>(Landroidx/lifecycle/viewmodel/R$id;)V
    HSPLokhttp3/CacheControl$Companion;->parse(Lokhttp3/Headers;)Lokhttp3/CacheControl;
    HSPLokhttp3/CacheControl;-><clinit>()V
    HSPLokhttp3/CacheControl;-><init>(ZZIIZZZIIZZZLjava/lang/String;)V
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Mon Dec 30 23:28:56 UTC 2024
    - 127.9K bytes
    - Viewed (0)
Back to top