- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 12 for maxTime (0.18 sec)
-
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 May 03 11:42:14 GMT 2024 - Last Modified: Wed Apr 10 19:46:48 GMT 2024 - 26.8K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/kt/CacheResponse.kt
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 2K bytes - Viewed (2) -
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 May 03 11:42:14 GMT 2024 - Last Modified: Wed Apr 10 19:46:48 GMT 2024 - 142.5K bytes - Viewed (0) -
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 May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 3.2K bytes - Viewed (0) -
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 May 03 11:42:14 GMT 2024 - Last Modified: Sun Feb 06 02:19:09 GMT 2022 - 3.1K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/cache/DiskLruCacheTest.kt
private val toClose = ArrayDeque<DiskLruCache>() private fun createNewCache() { createNewCacheWithSize(Int.MAX_VALUE) } private fun createNewCacheWithSize(maxSize: Int) { cache = DiskLruCache(filesystem, cacheDir, appVersion, 2, maxSize.toLong(), taskRunner).also { toClose.add(it) } synchronized(cache) { cache.initialize() } } fun setUp( baseFilesystem: FileSystem,
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) -
okhttp/src/test/java/okhttp3/KotlinSourceModernTest.kt
val urls: MutableIterator<String> = cache.urls() val writeAbortCount: Int = cache.writeAbortCount() val writeSuccessCount: Int = cache.writeSuccessCount() val size: Long = cache.size() val maxSize: Long = cache.maxSize() cache.flush() cache.close() val directory: File = cache.directory val networkCount: Int = cache.networkCount() val hitCount: Int = cache.hitCount()
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Apr 01 14:21:25 GMT 2024 - 46.5K bytes - Viewed (4) -
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 May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 34.7K bytes - Viewed (0) -
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 May 03 11:42:14 GMT 2024 - Last Modified: Mon Apr 15 13:41:01 GMT 2024 - 70.2K bytes - Viewed (0) -
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 May 03 11:42:14 GMT 2024 - Last Modified: Wed Apr 10 19:46:48 GMT 2024 - 1.3K bytes - Viewed (0)