Baseflow / flutter_cache_manager

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

Await futures in emptyCache #370

Open banool opened 2 years ago

banool commented 2 years ago

:sparkles: What kind of change does this PR introduce? (Bug fix, feature, docs update...)

Hard to say, sort of a bug fix.

:arrow_heading_down: What is the current behavior?

Currently when you empty the cache, even if you await it, some of the work happens out of band.

:new: What is the new behavior (if this is a feature change)?

When you empty the cache and await it, all the underlying functionality is awaited as well.

:boom: Does this PR introduce a breaking change?

A little. Callers may be used to this call being quick, now it will take a bit longer. Users who prefer the previous behaviour should likely stop awaiting the future. This is generally preferred and standard; awaiting a future should actually await all the underlying functionality and if a user doesn't want to wait for that, they just don't await it.

:bug: Recommendations for testing

I've tested this locally but can test further if requested.

:memo: Links to relevant issues/docs

No issue that I'm aware of.

:thinking: Checklist before submitting

LastxTemplar commented 7 months ago

Is there a timeline for when this will be reviewed?