Hi! How can I update the Bitmap image in the cache using Glide in Android?
You can use the diskCacheStrategy
option in Glide to control how images are cached on disk. To update the Bitmap image in the cache, you can set the diskCacheStrategy
to DiskCacheStrategy.NONE
and then reload the image using Glide. This will cause the image to be reloaded from the source and the cache will be updated with the new image.
Here's an example of how you can do this in code:
Glide.with(context)
.load(yourImageUrl)
.diskCacheStrategy(DiskCacheStrategy.NONE)
.into(yourImageView);