Baseflow / flutter_cache_manager

Generic cache manager for flutter
https://baseflow.com
MIT License
739 stars 426 forks source link

[Feature request] Add retry mechanism #340

Open JulianAssmann opened 2 years ago

JulianAssmann commented 2 years ago

🚀 Feature Requests

A retry mechanism for when the initial download of a file over the network fails. This could be analogous to the fetch strategy implementation in the flutter_image package, supporting exponential backoff, timeouts and so on.

Contextualize the feature

This should be a feature of the CacheManager.getFileStream(...) method. An optional fetchStrategy parameter could be added, allowing to specify the timeouts, retry count and exponential backoff for the initial download.

Describe the feature

flutter_image already provides a good implementation of this feature.

Platforms affected (mark all that apply)

huakucha commented 2 years ago

when the retry mechanism can be used?