- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 33 for CacheControl (0.08 sec)
-
okhttp/src/main/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 Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Apr 15 13:41:01 UTC 2024 - 10K bytes - Viewed (0) -
okhttp/src/test/java/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 Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 7.3K bytes - Viewed (0) -
okhttp/src/test/java/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 Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Apr 15 13:41:01 UTC 2024 - 2.7K bytes - Viewed (0) -
okhttp/src/main/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 = commonCacheControl(cacheControl) open fun get(): Builder = commonGet() open fun head(): Builder = commonHead()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Apr 06 04:17:44 UTC 2024 - 10.5K bytes - Viewed (0) -
okhttp/src/test/java/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 Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 10.7K bytes - Viewed (0) -
okhttp/src/main/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 { return CacheControl( noCache = noCache, noStore = noStore,
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Apr 15 13:41:01 UTC 2024 - 7.2K bytes - Viewed (0) -
okhttp/src/test/java/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 Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 13.3K bytes - Viewed (0) -
okhttp/src/main/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 Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Apr 15 13:24:48 UTC 2024 - 12K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/-ResponseCommon.kt
else -> false } val Response.commonCacheControl: CacheControl get() { var result = lazyCacheControl if (result == null) { result = CacheControl.parse(headers) lazyCacheControl = result } return result } fun Response.commonClose() { body.close() }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Apr 15 13:24:48 UTC 2024 - 5.2K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/-RequestCommon.kt
} fun Request.Builder.commonHeaders(headers: Headers) = apply { this.headers = headers.newBuilder() } fun Request.Builder.commonCacheControl(cacheControl: CacheControl): Request.Builder { val value = cacheControl.toString() return when { value.isEmpty() -> removeHeader("Cache-Control") else -> header("Cache-Control", value) } }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 4.1K bytes - Viewed (0)