asyncache icon indicating copy to clipboard operation
asyncache copied to clipboard

await pending future

Open makeroo opened this issue 2 years ago • 0 comments

It's a possible solution for https://github.com/hephex/asyncache/issues/2

When invoking the same cached func multiple times, if the future returned by the first call is still pending then wait for it instead of triggering a new call.

Note: do not cache errors. When the call fails, the future is removed from the cache.

Note 2: this behaviours should be customizable (ie. error handling, multiple calls, etc.)

makeroo avatar Dec 20 '23 12:12 makeroo