cogwheel.utils.lru_cache

cogwheel.utils.lru_cache(*args, **kwargs)

Cache function results and register it for easy cache clearing.

This decorator behaves like functools.lru_cache but also adds the decorated function to _cached_functions_registry so that all caches can be cleared with clear_caches().