Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 12 for maxTime (0.18 sec)

  1. okhttp/src/main/kotlin/okhttp3/internal/cache/DiskLruCache.kt

            }
            return super.sink(file, mustCreate)
          }
        }
    
      /** The maximum number of bytes that this cache should use to store its data. */
      @get:Synchronized @set:Synchronized
      var maxSize: Long = maxSize
        set(value) {
          field = value
          if (initialized) {
            cleanupQueue.schedule(cleanupTask) // Trim the existing store if necessary.
          }
        }
    
      /*
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 34.7K bytes
    - Viewed (0)
  2. okhttp/api/okhttp.api

    	public fun flush ()V
    	public final fun hitCount ()I
    	public final fun initialize ()V
    	public final fun isClosed ()Z
    	public static final fun key (Lokhttp3/HttpUrl;)Ljava/lang/String;
    	public final fun maxSize ()J
    	public final fun networkCount ()I
    	public final fun requestCount ()I
    	public final fun size ()J
    	public final fun urls ()Ljava/util/Iterator;
    	public final fun writeAbortCount ()I
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Apr 15 13:41:01 GMT 2024
    - 70.2K bytes
    - Viewed (0)
  3. okhttp/src/main/kotlin/okhttp3/internal/NativeImageTestsAccessors.kt

    import okhttp3.internal.connection.RealCall
    import okhttp3.internal.connection.RealConnection
    import okio.FileSystem
    import okio.Path
    
    internal fun buildCache(
      file: Path,
      maxSize: Long,
      fileSystem: FileSystem,
    ): Cache {
      return Cache(fileSystem, file, maxSize)
    }
    
    internal var RealConnection.idleAtNsAccessor: Long
      get() = idleAtNs
      set(value) {
        idleAtNs = value
      }
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 1.3K bytes
    - Viewed (0)
  4. docs/recipes.md

    === ":material-language-kotlin: Kotlin"
        ```kotlin
          private val client: OkHttpClient = OkHttpClient.Builder()
              .cache(Cache(
                  directory = cacheDirectory,
                  maxSize = 10L * 1024L * 1024L // 10 MiB
              ))
              .build()
    
          fun run() {
            val request = Request.Builder()
                .url("http://publicobject.com/helloworld.txt")
                .build()
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Fri Feb 18 08:52:22 GMT 2022
    - 40.2K bytes
    - Viewed (1)
  5. okhttp/src/test/resources/okhttp3/internal/publicsuffix/public_suffix_list.dat

    onfabrica.com
    
    // Facebook, Inc.
    // Submitted by Peter Ruibal <******@****.***>
    apps.fbsbx.com
    
    // FAITID : https://faitid.org/
    // Submitted by Maxim Alzoba <******@****.***>
    // https://www.flexireg.net/stat_info
    ru.net
    adygeya.ru
    bashkiria.ru
    bir.ru
    cbg.ru
    com.ru
    dagestan.ru
    grozny.ru
    kalmykia.ru
    kustanai.ru
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Wed Dec 20 23:27:07 GMT 2023
    - 240.3K bytes
    - Viewed (3)
  6. okhttp/src/main/kotlin/okhttp3/Cache.kt

      constructor(directory: File, maxSize: Long) : this(
        FileSystem.SYSTEM,
        directory.toOkioPath(),
        maxSize,
      )
    
      internal val cache =
        DiskLruCache(
          fileSystem = fileSystem,
          directory = directory,
          appVersion = VERSION,
          valueCount = ENTRY_COUNT,
          maxSize = maxSize,
          taskRunner = taskRunner,
        )
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 26.8K bytes
    - Viewed (0)
  7. samples/guide/src/main/java/okhttp3/recipes/kt/CacheResponse.kt

    class CacheResponse(cacheDirectory: File) {
      private val client: OkHttpClient =
        OkHttpClient.Builder()
          .cache(
            Cache(
              directory = cacheDirectory,
              // 1 MiB.
              maxSize = 10L * 1024L * 1024L,
            ),
          )
          .build()
    
      fun run() {
        val request =
          Request.Builder()
            .url("http://publicobject.com/helloworld.txt")
            .build()
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2K bytes
    - Viewed (2)
  8. okhttp/src/test/java/okhttp3/CallTest.kt

          .build()
      private val callback = RecordingCallback()
      private val cache =
        Cache(
          fileSystem = LoggingFilesystem(fileSystem),
          directory = "/cache".toPath(),
          maxSize = Int.MAX_VALUE.toLong(),
        )
    
      @BeforeEach
      fun setUp(
        server: MockWebServer,
        @MockWebServerInstance("server2") server2: MockWebServer,
      ) {
        this.server = server
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 142.5K bytes
    - Viewed (0)
  9. okhttp-dnsoverhttps/src/test/java/okhttp3/dnsoverhttps/TestDohMain.kt

            getOnly = false,
          )
        runBatch(dnsProviders, names)
        val dnsCache =
          Cache(
            directory = File("./target/TestDohMain.cache.${System.currentTimeMillis()}"),
            maxSize = 10L * 1024 * 1024,
          )
        println("Bad targets\n***********\n")
        val url = "https://dns.cloudflare.com/.not-so-well-known/run-dmc-query".toHttpUrl()
        val badProviders =
          listOf(
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.2K bytes
    - Viewed (0)
  10. docs/features/caching.md

    ```kotlin
      private val client: OkHttpClient = OkHttpClient.Builder()
          .cache(Cache(
              directory = File(application.cacheDir, "http_cache"),
              // $0.05 worth of phone storage in 2020
              maxSize = 50L * 1024L * 1024L // 50 MiB
          ))
          .build()
    ```
    
    ## EventListener events 
    
    Cache Events are exposed via the EventListener API.  Typical scenarios are below.
    
    ### Cache Hit
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sun Feb 06 02:19:09 GMT 2022
    - 3.1K bytes
    - Viewed (0)
Back to top