mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
parent
bb6a17e23c
commit
1ccd3d732d
1 changed files with 5 additions and 0 deletions
|
@ -8,6 +8,7 @@ import com.bumptech.glide.Registry
|
|||
import com.bumptech.glide.annotation.GlideModule
|
||||
import com.bumptech.glide.integration.okhttp3.OkHttpUrlLoader
|
||||
import com.bumptech.glide.load.engine.DiskCacheStrategy
|
||||
import com.bumptech.glide.load.engine.cache.InternalCacheDiskCacheFactory
|
||||
import com.bumptech.glide.load.model.GlideUrl
|
||||
import com.bumptech.glide.module.AppGlideModule
|
||||
import com.bumptech.glide.request.RequestOptions
|
||||
|
@ -27,6 +28,10 @@ class GlideModule : AppGlideModule() {
|
|||
RequestOptions()
|
||||
.diskCacheStrategy(DiskCacheStrategy.ALL)
|
||||
.signature(ObjectKey(System.currentTimeMillis().toShort()))
|
||||
}.setDiskCache {
|
||||
// Possible to make this a setting in the future.
|
||||
val memoryCacheSizeBytes: Long = 1024 * 1024 * 100; // 100mb
|
||||
InternalCacheDiskCacheFactory(context, memoryCacheSizeBytes).build()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue