I'm using https://pub.dev/packages/cached_network_image for display network image.
I came across with curious issue. Here I'm setting my profile image and url of profile image will be same, Only image will be changed.
Suppose if, First time I upload profile image then I will get url like "https://xx.yyy/user/profileAvatar" First time all works fine. But when I change profile image second time I will get same url as above with new image. But issue is here CachedNetworkImage
can't able to load my new image.
Need your guidance to solve this issue.
PS. : I know, If I delete previous image from cache directory before uploading second one it will solve my issue.
UPDATED:
OMG, Same things even doesn't work with Image.network
too.
If an image changes, I would consider that to be a new resource. If we consider it to be a new resource, then it should really have a new resource locator (i.e. new URI) associated with it. Caching images anywhere (in a browser, CDN, etc.) becomes pretty challenging if they are updating but using the same URI.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With