- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 24 for cacheHit (0.06 sec)
-
okhttp/src/test/java/okhttp3/EventListenerTest.kt
.containsExactly("CallStart", "CacheHit", "CallEnd") } private fun enableCache(): Cache? { cache = makeCache() client = client.newBuilder().cache(cache).build() return cache } private fun makeCache(): Cache { val cacheDir = File.createTempFile("cache-", ".dir") cacheDir.delete() return Cache(cacheDir, (1024 * 1024).toLong()) }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Jan 20 10:30:28 UTC 2024 - 56.9K bytes - Viewed (2) -
docs/changelogs/changelog_4x.md
.build() val client = OkHttpClient.Builder() .sslSocketFactory(clientCertificates.sslSocketFactory(), clientCertificates.trustManager) .build() ``` * New: Add `cacheHit`, `cacheMiss`, and `cacheConditionalHit()` events to `EventListener`. Use these in logs, metrics, and even test cases to confirm your cache headers are configured as expected.
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Wed Apr 17 13:25:31 UTC 2024 - 25.2K bytes - Viewed (0) -
okhttp/api/okhttp.api
public static final field NONE Lokhttp3/EventListener; public fun <init> ()V public fun cacheConditionalHit (Lokhttp3/Call;Lokhttp3/Response;)V public fun cacheHit (Lokhttp3/Call;Lokhttp3/Response;)V public fun cacheMiss (Lokhttp3/Call;)V public fun callEnd (Lokhttp3/Call;)V public fun callFailed (Lokhttp3/Call;Ljava/io/IOException;)V public fun callStart (Lokhttp3/Call;)V
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Apr 15 13:41:01 UTC 2024 - 70.2K bytes - Viewed (0) -
regression-test/src/androidTest/java/okhttp/regression/compare/AndroidHttpEngineTest.kt
@SdkSuppress(minSdkVersion = 34) class AndroidHttpEngineTest { val context = InstrumentationRegistry.getInstrumentation().context val cacheDir = context.cacheDir.resolve("httpEngine").also { it.mkdirs() } val engine = HttpEngine.Builder(context) .setEnableBrotli(true) .setStoragePath(cacheDir.path) .setEnableHttpCache(HttpEngine.Builder.HTTP_CACHE_DISK, 10_000_000) .setConnectionMigrationOptions(
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sun Mar 24 13:19:43 UTC 2024 - 6.2K bytes - Viewed (0) -
build-logic/cleanup/src/main/kotlin/gradlebuild/cleanup/Cleanup.kt
private fun scriptsCacheDirsUnder(cacheDir: File) = scriptCacheDirNames .map { File(cacheDir, it) } .filter { it.isDirectory } /** * Clean up cache files for older versions that aren't multi-process safe. */ fun FileSystemOperations.removeDodgyCacheFiles(dir: Directory) { if (dir.asFile.isDirectory) { for (cacheDir in dir.asFile.listFiles()) {
Registered: Wed Nov 06 11:36:14 UTC 2024 - Last Modified: Fri Jun 28 08:29:28 UTC 2024 - 4.4K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/cache/DiskLruCacheTest.kt
this.windows = windows if (filesystem.exists(cacheDir)) { filesystem.deleteRecursively(cacheDir) } journalFile = cacheDir / DiskLruCache.JOURNAL_FILE journalBkpFile = cacheDir / DiskLruCache.JOURNAL_FILE_BACKUP createNewCache() } @AfterEach fun tearDown() { while (!toClose.isEmpty()) { toClose.pop().close() } taskFaker.close()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Apr 15 14:55:09 UTC 2024 - 75.8K bytes - Viewed (0) -
lib/wasm/go_wasip1_wasm_exec
;; "wasmer") exec wasmer run --dir=/ --env PWD="$PWD" --env PATH="$PATH" ${GOWASIRUNTIMEARGS:-} "$1" -- "${@:2}" ;; "wazero") exec wazero run -mount /:/ -env-inherit -cachedir "${TMPDIR:-/tmp}"/wazero ${GOWASIRUNTIMEARGS:-} "$1" "${@:2}" ;; "wasmtime" | "") exec wasmtime run --dir=/ --env PWD="$PWD" --env PATH="$PATH" -W max-wasm-stack=1048576 ${GOWASIRUNTIMEARGS:-} "$1" "${@:2}" ;; *)
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Fri Aug 30 19:15:21 UTC 2024 - 797 bytes - Viewed (0) -
okhttp-dnsoverhttps/README.md
### Download ```kotlin testImplementation("com.squareup.okhttp3:okhttp-dnsoverhttps:4.12.0") ``` ### Usage ``` val appCache = Cache(File("cacheDir", "okhttpcache"), 10 * 1024 * 1024) val bootstrapClient = OkHttpClient.Builder().cache(appCache).build() val dns = DnsOverHttps.Builder().client(bootstrapClient) .url("https://dns.google/dns-query".toHttpUrl())
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sun Dec 17 15:34:10 UTC 2023 - 740 bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/Cache.kt
private inner class RealCacheRequest( private val editor: DiskLruCache.Editor, ) : CacheRequest { private val cacheOut: Sink = editor.newSink(ENTRY_BODY) private val body: Sink var done = false init { this.body = object : ForwardingSink(cacheOut) { @Throws(IOException::class) override fun close() { synchronized(this@Cache) {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Wed Apr 10 19:46:48 UTC 2024 - 26.8K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/internal.kt
): Headers.Builder = builder.addLenient(line) internal fun addHeaderLenient( builder: Headers.Builder, name: String, value: String, ): Headers.Builder = builder.addLenient(name, value) internal fun cacheGet( cache: Cache, request: Request, ): Response? = cache.get(request) internal fun applyConnectionSpec( connectionSpec: ConnectionSpec, sslSocket: SSLSocket, isFallback: Boolean,
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 3.7K bytes - Viewed (0)