Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Ion Cache Refresh

I'm using a specific url to obtain an image online, but the url itself automatically changes every few minutes. I'm using ION library from Here The problem I'm having is when I refresh the page, the page itself looks like it is refreshing but the exact same picture is appearing. I'm assuming its a cached image? If I reinstall the application, then it obtains the correct image again.

This is how I'm using ION where imageID2[position] is just a typical url to a jpg.

    Ion.with(imageView)
            .placeholder(R.drawable.ic_launcher)
            .error(R.drawable.ic_launcher)
            .load(imageId2[position]);

Is there anyway I can disable the cache or just make it refind the images again?

like image 260
John McKenzie Avatar asked Dec 03 '22 18:12

John McKenzie


1 Answers

Use .noCache() to bypass caches.

like image 78
koush Avatar answered Dec 05 '22 08:12

koush