I'm using volley like this. The problem is, Volley in my case only caches images in the memory but not on the disk. If I force the my application, all caches will be removed from the memory. How can I have caches on both the memory and the disk?
public ImageLoader getImageLoader() {
getRequestQueue();
if (mImageLoader == null) {
mImageLoader = new ImageLoader(this.mRequestQueue, new LruBitmapCache(getApplicationContext()));
}
return this.mImageLoader;
}
holder.picture.setImageUrl(url, MyApplication.getInstance().getImageLoader());
Note: I had used DiskLruCache
written by Jake Wharton and everything works fine but in this way, caches only exist on the disk. I want Volley to get the bitmap from the memory if exists, otherwise from the disk if exists, if there is no cache for the URL, make a network call.