Closed sidrao2006 closed 3 years ago
I think it's better to make the
file.delete()
awaited as the benefits of speed don't really outweigh the unexpected results.
@renefloor just to confirm, are these the changes that you recommended here?
Yes I think that should be it, but I'll try to check better tomorrow.
@renefloor Just a reminder for reviewing this PR
@renefloor could you please review and merge this PR? Thank you
@renefloor any update on this PR? Any changes required? Thanks
@renefloor can you please publish this change by the end of the day? Thanks
Just published as flutter_cache_manager: ^3.1.2
:arrow_heading_down: What is the current behavior?
File removal is not awaited. Due to this, calling
CacheManager.removeFile
appears to have flaky performance.:new: What is the new behavior (if this is a feature change)?
File removal is awaited. The
Future
returned byremoveFile
completes when file is removed.:boom: Does this PR introduce a breaking change?
No, but it does slow down any callers of this method which
await
it's result:memo: Links to relevant issues/docs
Fixes #317
:thinking: Checklist before submitting