Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 25 for cacheHit (1.81 sec)

  1. 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())
      }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 56.9K bytes
    - Viewed (0)
  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.
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 17 13:25:31 GMT 2024
    - 25.2K bytes
    - Viewed (0)
  3. 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
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 15 13:41:01 GMT 2024
    - 70.2K bytes
    - Viewed (0)
  4. 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()) {
    Plain Text
    - Registered: Wed May 01 11:36:15 GMT 2024
    - Last Modified: Mon Jan 08 12:45:57 GMT 2024
    - 4.4K bytes
    - Viewed (0)
  5. 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(
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Mar 24 13:19:43 GMT 2024
    - 6.2K bytes
    - Viewed (0)
  6. 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()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 15 14:55:09 GMT 2024
    - 75.8K bytes
    - Viewed (0)
  7. 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())
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Dec 17 15:34:10 GMT 2023
    - 740 bytes
    - Viewed (4)
  8. misc/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}"
    		;;
    	*)
    Shell Script
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Apr 11 17:09:10 GMT 2024
    - 797 bytes
    - Viewed (0)
  9. 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,
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.7K bytes
    - Viewed (0)
  10. 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) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 26.8K bytes
    - Viewed (0)
Back to top