Sep 22, 2021
My answer would be to have some sort of web-service that acts as a broker/load balancer. If say, 10 identical requests come in (destined for the cache) at once, the first one gets sent through to the Expensive API where the other 9 are paused and kept open.
When the single call to the Expensive API completes, it gets written to the cache, and returned to all 10 callers are the same time. :-)