masikh / memoize Goto Github PK
View Code? Open in Web Editor NEWPython memoize decorator. A class to be used as a decorator for any method. It has the ability to cache the output of a function provided that the method takes at least one argument (read: *arg not **kwarg). The first argument is used as a key for storing the cache into a dictionary.