Hacker News new | ask | show | jobs
by crb002 4452 days ago
I would memoize with an alias_method wrapper and let it hit a cache_hash before calling the original function. This is a generic pattern that should work for all immutable functions.

http://stackoverflow.com/questions/21790868/simple-aspect-or...