mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-14 14:20:30 +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) {
|
fun initCronet(context: Context) {
|
||||||
engine = CronetEngine.Builder(context)
|
engine = CronetEngine.Builder(context)
|
||||||
|
.enableHttp2(true)
|
||||||
|
.enableQuic(true)
|
||||||
.enableBrotli(true)
|
.enableBrotli(true)
|
||||||
|
.enableHttpCache(CronetEngine.Builder.HTTP_CACHE_IN_MEMORY, 1024L * 1024L) // 1MiB
|
||||||
.build()
|
.build()
|
||||||
|
|
||||||
callFactory = CronetCallFactory.newBuilder(engine)
|
callFactory = CronetCallFactory.newBuilder(engine)
|
||||||
.build()
|
.build()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user