flutter_advanced_networkimage icon indicating copy to clipboard operation
flutter_advanced_networkimage copied to clipboard

Respect response headers

Open kmcgill88 opened this issue 6 years ago • 2 comments

Great work! Does this package respect Cache-Control headers? Specifically, if a server responds with Cache-Control: no-cache and I pass cacheRule: CacheRule(maxAge: const Duration(days: 7)), will this lib ignore the server and still cache the image for 7 days? What takes priority.

Thanks!

kmcgill88 avatar Mar 02 '19 16:03 kmcgill88

Unfortunately no, this package only respects to CacheRule.

mchome avatar Mar 02 '19 17:03 mchome

That's the behavior I'm looking for. I want to ignore the server headers and set my own cache duration. That could be a cool feature to add at some point. Allowing devs to set priority headers from the server or use only the cache rule.

kmcgill88 avatar Mar 02 '19 18:03 kmcgill88