Glide Version:
4.9.0
Integration libraries:
OkHttp (but the issue happens without it too)
Device/Android Version:
Android P, Pixel 2 (and an emulator)
Issue details:
I want to globally disable glide's disk caching and fallback entirely to OkHttp caching. To do this, I'm applying the DiskCacheAdapter. Adding this DiskCacheAdapter somehow causes the image to never load! If I don't add this line, images load correctly.
E.g.:
@GlideModule
class GlideModule : AppGlideModule() {
override fun isManifestParsingEnabled(): Boolean = false
override fun applyOptions(context: Context, builder: GlideBuilder) {
// If I comment out this line, the image loads correctly
builder.setDiskCache(DiskCacheAdapter.Factory())
}
}
This will happen if you're using DiskCacheStrategy.DATA/ALL/AUTOMATIC with Glide. You can change the DiskCacheStrategy.NONE or build your own that uses NONE for remote images and RESOURCE for local images.
http://bumptech.github.io/glide/javadocs/490/com/bumptech/glide/load/engine/DiskCacheStrategy.html
I can use DiskCacheStrategy.NONE which works fine, but you need to apply it to every single Glide usage. Is there a way to do this globally?
This issue has been automatically marked as stale because it has not had activity in the last seven days. It will be closed if no further activity occurs within the next seven days. Thank you for your contributions.
http://bumptech.github.io/glide/doc/configuration.html#default-request-options
This issue has been automatically marked as stale because it has not had activity in the last seven days. It will be closed if no further activity occurs within the next seven days. Thank you for your contributions.