Hacker News new | ask | show | jobs
by duped 208 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.
1 comments

Thanks, that's a useful trick.