DEV Community

Discussion on: Memoizing async functions in Javascript

anishkumar profile image
Anish Kumar Author • Edited

Yes. WeakMap would be a good choice if you are using objects as keys, it would facilitate better garbage collection in this case. If your keys are strings, using object should be fine.