$ luarocks install memoize
* Caches the results based on multiple parameters instead of just 1.
* Doesn't rely on `tostring`; instead, it uses operator `==` on all the
parameters (this is accomplished by structuring the cache in a
tree structure, where each tree node corresponds to one
parameter).
* Works well with functions returning multiple values
* Can memoize both functions and "callable tables" (tables with a `__call`
metamethod)
Versions
Dependencies
lua >= 5.1