ImageSource , how to invalidate / clear the cache ?

ClubberLangClubberLang BEMember ✭✭

Hi,

In my app I upload a new "user profile" image on the server, then I try to update the image with the new version (Noticed that the image uri is the same).
But it seems that the Image cache cannot be invalidated !

I have try several solutions, but find no way ! Even when I restart the application I get the old version of the image.

Here is my code :

        (MediaImageSource as UriImageSource).CacheValidity = new TimeSpan(-1);
        FFImageLoading.Forms.CachedImage.InvalidateCache(MediaImageSource, FFImageLoading.Cache.CacheType.All, true);
        FFImageLoading.ImageService.Instance.InvalidateCacheAsync(FFImageLoading.Cache.CacheType.All);

Does someone has a solution for this ?

Sign In or Register to comment.