13 ms·
Now lets say its an async cache instead of singleton.
by never_inline 10mo ago
Now lets say its an async cache instead of singleton.
- duped 10mo agoReturn the cached item if it exists else spawn a task to update it (doing nothing if the task has already been spawned), await the task and return the cached item.
- never_inline 10mo agoThanks, that's a useful trick.