### methodtools.lru_cache usage Source: https://methodtools.readthedocs.io/en/latest/index.html Demonstrates how to use methodtools.lru_cache with methods, classmethods, and staticmethods. ```python from methodtools import lru_cache class A(object): # cached method. the storage lifetime follows `self` object @lru_cache() def cached_method(self, args): ... # cached classmethod. the storage lifetime follows `A` class @lru_cache() # the order is important! @classmethod # always lru_cache on top of classmethod def cached_classmethod(self, args): ... # cached staticmethod. the storage lifetime follows `A` class @lru_cache() # the order is important! @staticmethod # always lru_cache on top of staticmethod def cached_staticmethod(self, args): ... @lru_cache() # just same as functools.lru_cache def cached_function(): ... ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.