mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-04-03 09:28:18 +02:00
Increasing Image disk cache size to 1GB
This commit is contained in:
parent
e381e2f05f
commit
1b8d83f41a
@ -15,6 +15,7 @@ import coil.ImageLoader
|
||||
import coil.decode.GifDecoder
|
||||
import coil.decode.ImageDecoderDecoder
|
||||
import coil.decode.SvgDecoder
|
||||
import coil.disk.DiskCache
|
||||
import coil.memory.MemoryCache
|
||||
import coil.request.CachePolicy
|
||||
import com.vitorpamplona.amethyst.EncryptedStorage
|
||||
@ -50,6 +51,11 @@ class MainActivity : ComponentActivity() {
|
||||
add(GifDecoder.Factory())
|
||||
}
|
||||
add(SvgDecoder.Factory())
|
||||
}.diskCache {
|
||||
DiskCache.Builder()
|
||||
.directory(this.cacheDir.resolve("image_cache"))
|
||||
.maxSizeBytes(1*1024*1024*1024)
|
||||
.build()
|
||||
}
|
||||
.respectCacheHeaders(false)
|
||||
.build()
|
||||
|
Loading…
x
Reference in New Issue
Block a user