When I use glide, some images doesn\'t loads. How can I store it in the cache, or anywhere, to when I\'ll use the app all my images loads. Example picture of my problem:
Glide will put all image resources into the memory cache by default. Thus, a specific call .skipMemoryCache( false )
is not necessary.
Hint: beware of the fact, that if you make an initial request to the same URL without the .skipMemoryCache( true )
and then with the method, the resource will get cached in memory. Make sure you're consistent across all calls to the same resource, when you want to adjust the caching behavior!
Referance: https://futurestud.io/tutorials/glide-caching-basics
Please Read the Description below as per official documentation : https://futurestud.io/tutorials/glide-caching-basics
Here is a common scenario you want to load image from the cache and download the new data only if a new image exist , you have to have a way to know if the image is updated ,for example a variable called imageTimeStamp containing the last time the image was updated.
Glide.with(context).load(url).apply(new RequestOptions()
.placeholder(R.drawable.defultIcon)
.signature(new ObjectKey(image.getPPTimeStamp()))) // here you add some value , if the next time you add the same value then it will load from cache otherwise if you put new value you will download , then save in cache
.into(icon);