Baseflow / Baseflow/flutter_cached_network_image
CachedNetworkImage.evictFromCache() is not working.
- Dominant language
- Dart
- Stars
- 2.6k
- Forks
- 731
- Avg merge
- 3d 9h
- Merged PRs (30d)
- 1
Description
## 🐛 Bug Report
### Description
I'm working with firebase storage. When I upload a new image (with the same URL) the widget is still showing the previous image, even if I have executed the `CachedNetworkImage.evictFromCache(widget.profile.photoUrl)` function.
I am also executing this function, `DefaultCacheManager().emptyCache();` but cache still shows the previous image.
Even if I kill the app, and the previous image does not exists anymore in firebase storage (because I have override the URL), it still shows the previous image.
I have to do a **fresh** install (delete the app and install it again) to show the new image.
**The most weird fact is that cache works good (shows the correct image) when I upload light images (<1Mb).**
So basically the problem is happening when uploading heavy images.
### Expected behavior
The cache should _forget about the previous image_ once I execute the `evictFromCache` method.
### Configuration
Flutter (Channel stable, 1.22.5, on macOS 11.2 20D64 darwin-arm, locale es-419)
**Version:** 2.5.0
**Platform:**
- [x] :iphone: iOS
- [x] :robot: Android
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the issue with CachedNetworkImage.evictFromCache(widget.profile.photoUrl) and DefaultCacheManager().emptyCache() using both light and heavy Firebase Storage images. Verify on iOS and Android that evicting the URL removes the previous image and that the replacement is displayed without reinstalling the app.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart, flutter
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100