▲ | chmod775 3 days ago | |
This is just how you should implement any (clientside) cache in a concurrent situation. It's the obvious and correct way. I expect you'll find this pattern implemented with promises in thousands of javascript/typescript codebases. This query will probably find loads already: https://github.com/search?q=language%3Atypescript+%22new+Map... |