Reputation: 201
Trying to work with Glide for Android and Firebase.
My code is working perfectly (uploading, downloading into ImageViews), my problem is that when I change the image in the Firebase Storage (for example, a user image), the app doesn't "know" that the image in the database has changed and keeps showing the cached version.
Obviously I want the app to use cache, but in a way that knows if the original image has changed in the database.
Is there a way to do it?
Upvotes: 1
Views: 634
Reputation: 75
if cache is not wanted, you can try
Glide.with(ctx)
.load(Uri))
.diskCacheStrategy(DiskCacheStrategy.NONE)
.skipMemoryCache(true)
.into(mImage);
And also This will remove cache memory which is stored by Glide.
Glide.get(ctx).clearDiskCache();
Upvotes: 2