pysteps.decorators.memoize

pysteps.decorators.memoize(maxsize=10)

Add a Least Recently Used (LRU) cache to any function. Caching is purely based on the optional keyword argument ‘hkey’, which needs to be a hashable.

Parameters
maxsize: int, optional

The maximum number of elements stored in the LRU cache.