Y
Hacker News
new
|
ask
|
show
|
jobs
by
never_inline
211 days ago
Now lets say its an async cache instead of singleton.
1 comments
duped
211 days ago
Return 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.
link
never_inline
210 days ago
Thanks, that's a useful trick.
link