- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 11 for CacheControl (0.07 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 Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Aug 16 09:39:51 UTC 2025 - 13.1K 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()) } @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) -
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) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/Response.kt
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Mon Jul 28 14:39:28 UTC 2025 - 18.1K 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 Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Aug 16 09:39:51 UTC 2025 - 69.4K 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 Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Aug 16 09:39:51 UTC 2025 - 69.4K 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() } @Test
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Aug 16 09:39:51 UTC 2025 - 19K 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 Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Aug 02 14:12:28 UTC 2025 - 29K bytes - Viewed (0) -
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) -
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)