mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-14 06:10:31 +05:30
enable http cache for retrofit
This commit is contained in:
parent
0070583c11
commit
d3d82a7d0f
@ -11,8 +11,12 @@ class CronetHelper {
|
||||
|
||||
fun initCronet(context: Context) {
|
||||
engine = CronetEngine.Builder(context)
|
||||
.enableHttp2(true)
|
||||
.enableQuic(true)
|
||||
.enableBrotli(true)
|
||||
.enableHttpCache(CronetEngine.Builder.HTTP_CACHE_IN_MEMORY, 1024L * 1024L) // 1MiB
|
||||
.build()
|
||||
|
||||
callFactory = CronetCallFactory.newBuilder(engine)
|
||||
.build()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user