Closed EricPHassey closed 4 years ago
ImageProvider
class has a method called evict.
Thanks for the response @mchome As always I appreciate your promptness.
I've tried doing the following to no such luck:
await AdvancedNetworkImage(cameraImages[i].url).evict();
await AdvancedNetworkImage(cameraImages[i].url.hashCode.toString()).evict();
await DiskCache().evict(cameraImages[i].url);
await DiskCache().evict(cameraImages[i].url.hashCode.toString());
It still loads the wrong image even after I do those. Any chance I'm using it wrong?
@mchome Not sure if there's a better solution, but this appeared to have solved the problem for me. Makes your package super powerful now.
PaintingBinding.instance.imageCache.clear(); DiskCache().evict(cameraImages[i].url.hashCode.toString());
As the above code has resolved my problems, I'm going to close this.
Even when I set useDiskCache to false and/or evict the cache, the same "cached" image appears from the same url even when I change the image on this url.
It appears the memory cache is storing this image. When I set 'disableMemoryCache' to false, this works correctly, however as mentioned, it creates other production issues.
Anyway to remove/revoke the memory cache on a case by case example (instead of disabling it for all images?) Would certainly solve my problem.