I am trying to clear the entire cache of images loaded with Amir_Glide library by @alimanam3386. I tried to do the following in the Activity where the images are displayed.
hi I am using this code and AX_RecyclerView lib and Amir_Glide I have a picture source that is renewed every day. The picture from the application is not renewed every day. shows when I first installed the application. not showing the new picture the next day. not renewed. still showing the old...
hi I am using this code and AX_RecyclerView lib and Amir_Glide I have a picture source that is renewed every day. The picture from the application is not renewed every day. shows when I first installed the application. not showing the new picture the next day. not renewed. still showing the old...
From what I see it looks like this code is used to skip caching of a particular image so that it is always loaded live. In my case, I do want to cache all images. But when the user clicks a Refresh button, I want to clear the cache and load the images from the web again. How do I do that?
Public Sub LoadImage(useCache As Boolean , holder As ImageView , link As Object)
Dim g As Amir_Glide
g.Initializer.Default
g.RequestManager.ApplyDefaultRequestOptions(g.RO.SkipMemoryCache(useCache))
g.Load(link).Into(holder)
End Sub
Activity.LoadLayout("1")
ImageView1.Tag = Null
Dim color2 As ColorDrawable
color2.Initialize(Colors.Magenta,0)
gl.Initializer.Default
gl.RequestManager.ApplyDefaultRequestOptions(gl.RO.DiskCacheStrategy("NONE")) _
.ApplyDefaultRequestOptions(gl.RO.SkipMemoryCache(True)) _
.ApplyDefaultRequestOptions(gl.RO.ErrorDrawable(color2).Placeholder(color2).CenterCrop)
gl.Load(photoAddress).Into(ImageView1)
Since gl.RequestManager is called immediately after gl.Initializer.Default, I am assuming this will set the configuration for Glide regarding caching. That means images loaded from now on using Glide will not be cached. But does the above code clear those images that have already been cached by Glide?