News for hackers. Stuff that matters.
Re:Ask HN: What are some cool but obscure data structures yo... by balls187 on Friday July 22, 2022 @10:12AM (#32192033)
It's not the cost of saving the resolved data.

If I understand the pattern correctly, it is to avoid multiple asynchronous requests to a resource that has yet to be cached.

Re:Ask HN: What are some cool but obscure data structures yo... by gorjusborg on Friday July 22, 2022 @10:31AM (#32192229)
Yeah, that's my understanding too.

It seems like an optimization to prevent lots of downstream requests that occur in rapid succession before the first request would have finished. I'd also suspect that the entry would be removed from the map on failure.