Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 23 for cacheControl (0.09 sec)

  1. okhttp/src/commonJvmAndroid/kotlin/okhttp3/CacheControl.kt

     * on what responses can be stored, and which requests can be satisfied by those stored responses.
     *
     * See [RFC 7234, 5.2](https://tools.ietf.org/html/rfc7234#section-5.2).
     */
    class CacheControl internal constructor(
      /**
       * In a response, this field's name "no-cache" is misleading. It doesn't prevent us from caching
       * the response; it only means we have to validate the response with the origin server before
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Dec 27 13:39:56 UTC 2024
    - 10K bytes
    - Viewed (0)
  2. okhttp/src/jvmTest/kotlin/okhttp3/CacheControlTest.kt

      fun emptyBuilderIsEmpty() {
        val cacheControl = CacheControl.Builder().build()
        assertThat(cacheControl.toString()).isEqualTo("")
        assertThat(cacheControl.noCache).isFalse()
        assertThat(cacheControl.noStore).isFalse()
        assertThat(cacheControl.maxAgeSeconds).isEqualTo(-1)
        assertThat(cacheControl.sMaxAgeSeconds).isEqualTo(-1)
        assertThat(cacheControl.isPrivate).isFalse()
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 2.7K bytes
    - Viewed (0)
  3. okhttp/src/commonJvmAndroid/kotlin/okhttp3/Request.kt

        /**
         * Sets this request's `Cache-Control` header, replacing any cache control headers already
         * present. If [cacheControl] doesn't define any directives, this clears this request's
         * cache-control headers.
         */
        open fun cacheControl(cacheControl: CacheControl): Builder {
          val value = cacheControl.toString()
          return when {
            value.isEmpty() -> removeHeader("Cache-Control")
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 16 09:39:51 UTC 2025
    - 13.1K bytes
    - Viewed (1)
  4. okhttp/src/jvmTest/kotlin/okhttp3/KotlinDeprecationErrorTest.kt

      }
    
      @Test @Disabled
      fun cacheControl() {
        val cacheControl: CacheControl = CacheControl.Builder().build()
        val noCache: Boolean = cacheControl.noCache()
        val noStore: Boolean = cacheControl.noStore()
        val maxAgeSeconds: Int = cacheControl.maxAgeSeconds()
        val sMaxAgeSeconds: Int = cacheControl.sMaxAgeSeconds()
        val mustRevalidate: Boolean = cacheControl.mustRevalidate()
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Dec 27 13:39:56 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  5. okhttp/src/jvmTest/kotlin/okhttp3/KotlinSourceModernTest.kt

        val minFreshSeconds: Int = cacheControl.minFreshSeconds
        val onlyIfCached: Boolean = cacheControl.onlyIfCached
        val noTransform: Boolean = cacheControl.noTransform
        val immutable: Boolean = cacheControl.immutable
        val forceCache: CacheControl = CacheControl.FORCE_CACHE
        val forceNetwork: CacheControl = CacheControl.FORCE_NETWORK
        val parse: CacheControl = CacheControl.parse(headersOf())
      }
    
      @Test
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Jun 21 20:36:35 UTC 2025
    - 46.5K bytes
    - Viewed (0)
  6. okhttp/src/jvmTest/kotlin/okhttp3/RequestCommonTest.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: Wed Mar 19 19:25:20 UTC 2025
    - 10.8K bytes
    - Viewed (0)
  7. okhttp/src/commonJvmAndroid/kotlin/okhttp3/Cache.kt

     * Request request = new Request.Builder()
     *     .cacheControl(new CacheControl.Builder()
     *         .maxStale(365, TimeUnit.DAYS)
     *         .build())
     *     .url("http://publicobject.com/helloworld.txt")
     *     .build();
     * ```
     *
     * The [CacheControl] class can configure request caching directives and parse response caching
     * directives. It even offers convenient constants [CacheControl.FORCE_NETWORK] and
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 16 09:39:51 UTC 2025
    - 26.9K bytes
    - Viewed (0)
  8. okhttp/src/jvmTest/kotlin/okhttp3/CacheControlJvmTest.kt

        assertThat(cacheControl.isPublic).isFalse()
        assertThat(cacheControl.mustRevalidate).isFalse()
        assertThat(cacheControl.maxStaleSeconds).isEqualTo(-1)
        assertThat(cacheControl.minFreshSeconds).isEqualTo(-1)
        assertThat(cacheControl.onlyIfCached).isFalse()
        assertThat(cacheControl.noTransform).isFalse()
        assertThat(cacheControl.immutable).isFalse()
        assertThat(cacheControl.toString()).isEqualTo(header)
      }
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 7.4K bytes
    - Viewed (0)
  9. okhttp/src/commonJvmAndroid/kotlin/okhttp3/Response.kt

       * response contains no `Cache-Control` header.
       */
      @get:JvmName("cacheControl")
      val cacheControl: CacheControl
        get() {
          var result = lazyCacheControl
          if (result == null) {
            result = CacheControl.parse(headers)
            lazyCacheControl = result
          }
          return result
        }
    
      @JvmName("-deprecated_cacheControl")
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Mon Jul 28 14:39:28 UTC 2025
    - 18.1K bytes
    - Viewed (0)
  10. okhttp/api/android/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)
Back to top