i'm using volley to load my images and cache them.
mImageLoader = new ImageLoader(getRequestQueue(context), mImageCache);
which mImageCache is a DiskLruImageCache.
volley fetches images from server by ImageRequest
which extend the ImageRequest<Bitmap>
and in request class there is boolean that defines whether to cache the response or not
/** Whether or not responses to this request should be cached. */
private boolean mShouldCache = true;
and ImageRequest
hasn't disabled mShouldCache
.
as you can see the default value is true so after volley fetches an image caches it under the volley cache directory by diskBasedCache
.
so now i have to cache bitmap one from ImageRequest
and one from ImageLoader
how can i disable ImageRequest
cache ? or any other suggestions ?