Http cache

This commit is contained in:
Koitharu
2020-02-26 21:13:39 +02:00
parent 0a4d58b5bd
commit 60567757ae
4 changed files with 22 additions and 1 deletions

View File

@@ -19,6 +19,7 @@ import org.koitharu.kotatsu.core.local.CbzFetcher
import org.koitharu.kotatsu.core.local.PagesCache
import org.koitharu.kotatsu.core.prefs.AppSettings
import org.koitharu.kotatsu.domain.MangaLoaderContext
import org.koitharu.kotatsu.utils.CacheUtils
import java.util.concurrent.TimeUnit
class KotatsuApp : Application() {
@@ -41,7 +42,9 @@ class KotatsuApp : Application() {
modules(listOf(
module {
factory {
okHttp().build()
okHttp()
.cache(CacheUtils.createHttpCache(applicationContext))
.build()
}
}, module {
single {