- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 12 for CacheControl (0.06 sec)
-
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 Dec 26 11:42:13 UTC 2025 - Last Modified: Thu Oct 30 13:46:58 UTC 2025 - 14.7K bytes - Viewed (1) -
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()) } @TestRegistered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Wed Nov 05 18:28:35 UTC 2025 - 47K bytes - Viewed (0) -
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() } @TestRegistered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Fri Oct 24 11:36:14 UTC 2025 - 10.9K bytes - Viewed (0) -
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 Dec 26 11:42:13 UTC 2025 - Last Modified: Fri Oct 03 17:41:45 UTC 2025 - 26.8K bytes - Viewed (0) -
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 Dec 26 11:42:13 UTC 2025 - Last Modified: Wed Nov 05 18:28:35 UTC 2025 - 70.3K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/Response.kt
Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Mon Jul 28 14:39:28 UTC 2025 - 18.1K bytes - Viewed (0) -
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 Dec 26 11:42:13 UTC 2025 - Last Modified: Wed Nov 05 18:28:35 UTC 2025 - 70.2K bytes - Viewed (0) -
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() } @TestRegistered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Fri Oct 24 11:36:14 UTC 2025 - 24.4K bytes - Viewed (0) -
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 Dec 26 11:42:13 UTC 2025 - Last Modified: Tue Nov 04 19:13:52 UTC 2025 - 29.9K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/EventListenerTest.kt
@Test fun satisfactionFailure() { enableCache() val call = client.newCallWithListener( Request .Builder() .url(server.url("/")) .cacheControl(CacheControl.FORCE_CACHE) .build(), ) val response = call.execute() assertThat(response.code).isEqualTo(504) response.close() assertThat(eventRecorder.recordedEventTypes())
Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Wed Nov 05 18:28:35 UTC 2025 - 70.5K bytes - Viewed (0)