Open qeepcologne opened 2 months ago
why the the CachedNetworkImage widget throws an error , when the given URL is invalid , even error handler exists , this causes a test failed in widget testing
maybe this is the reason: https://github.com/Baseflow/flutter_cache_manager/blob/develop/flutter_cache_manager/lib/src/cache_manager.dart (underlying cache manager removes it when status code is 404).
🚀 Feature Requests
we fetching image like that which works pretty fine, with the exception of 404 response. Then the image is requested again and again. Don't know why they are not cached (status code or empty response?). Headers should be correct (The images never change (when content change, the uri will change, so we set the immutable header).
Describe the feature
allow caching of 404 image requests depending on cache headers. Server already returns suitable header
Cache-Control: immutable, max-age=86400
If needed add config similar to CacheOptions in DioCacheInterceptorhitCacheOnErrorExcept: [403, 503, 521], // do not cache temporary errors