memoize
An optimization technique used to speed up consecutive function calls
...Developers can supply custom cache-key functions when multiple arguments or value-based object comparisons are required. Cache entries can expire after a configurable duration, and storage can be replaced with Map-compatible implementations such as LRU caches. Utilities are provided for clearing cached values and checking whether a particular call is currently cached. The package also includes a decorator for memoizing class methods and getters in modern TypeScript and JavaScript environments. It can work with promise-returning functions, although the project recommends specialized alternatives for advanced async behavior.