How to inform the app that an image that was already downloaded and cached, was updated/changed on the server and needs to be Re-downloaded?
I have a ListView on my app that downloads the images and caches them so they wont have to be loaded again and again.
The problem is that when I edit or change the image on the server, the image on the app stays the same, because it is cached. it uses the image URL.
In other words, the code checks whether that URL was already used to download that image, and if it does, he pulls it out of the cache and displays it. else - it downloads it.
How can I inform the app, that there is a new image?
I mean, is there any common way to do that in my situation?
You can add a "Re-download" button, or something similar, that re-downloads the image and replaces the old one, it's the easiest way.
Another thing you can do, is check online every time if images are correct (you can have a value "version" that checks if images are current version), if an image is older version, download a new one.
I prefer the first version, it's way easier, but it's your pick :)