1
0
mirror of https://github.com/square/okhttp.git synced 2025-07-31 05:04:26 +03:00

Change parameter order for Cache constructor (#8338)

* Change parameter order for Cache constructor

Put FileSystem before Path, as is convention.

Also put this new constructor in the public API.

* apiDump

* Track the change in RunSurvey

* Track signature change
This commit is contained in:
Jesse Wilson
2024-04-10 15:46:48 -04:00
committed by GitHub
parent 5f008f382d
commit d2e91f7cb4
9 changed files with 23 additions and 24 deletions

View File

@ -170,7 +170,7 @@ class DnsOverHttpsTest {
// 5. unsuccessful response
@Test
fun usesCache() {
val cache = Cache("cache".toPath(), (100 * 1024).toLong(), cacheFs)
val cache = Cache(cacheFs, "cache".toPath(), (100 * 1024).toLong())
val cachedClient = bootstrapClient.newBuilder().cache(cache).build()
val cachedDns = buildLocalhost(cachedClient, false)
@ -208,7 +208,7 @@ class DnsOverHttpsTest {
@Test
fun usesCacheEvenForPost() {
val cache = Cache("cache".toPath(), (100 * 1024).toLong(), cacheFs)
val cache = Cache(cacheFs, "cache".toPath(), (100 * 1024).toLong())
val cachedClient = bootstrapClient.newBuilder().cache(cache).build()
val cachedDns = buildLocalhost(cachedClient, false, post = true)
repeat(2) {