flutter_cached_network_image
flutter_cached_network_image copied to clipboard
Image is not being refetched if updated and behind the same url
🐛 Bug Report
When I update an image behind the same url, the server (firebase storage) sends a changed etag and last-modified header, but flutter_cached_network_image will not refetch the image or update the cache. However I will never see the updated image in the app.
E.g.: Sent headers by firebase storage:
expires: Sat, 04 Jan 2025 07:28:31 GMT
date: Sat, 04 Jan 2025 07:28:31 GMT
cache-control: private, max-age=0
last-modified: Fri, 03 Jan 2025 23:13:20 GMT
etag: "2c5956f09b373d887f07b829a943b80b"
Expected behavior
I'm expecting that the image's etag is checked every time the image is requested in the app and if that etag has changed flutter_cached_network_image should refetch the image and update the cache.
Reproduction steps
Just use flutter_cached_network_image with its default cache_manager.
Configuration
Version: 3.4.1
Platform:
- [x] :iphone: iOS
- [x] :robot: Android
fyi https://pub.dev/packages/flutter_cache_manager#when-are-the-cached-files-updated my guess is you want to pass your own cache manager instead of the default they provide.