Per-instance lru_cache using wrapt

Following on from the previous post on stateful decorators , there is another small addition in wrapt 2.2.0 worth a closer look. A new wrapt.lru_cache helper has been added that fixes the long-standing issues with using functools.lru_cache on instance methods. The thing I want to emphasise up front is that wrapt.lru_cache is not a replacement for functools.lru_cache . The actual caching is still…