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_cachebut also adds the decorated function to_cached_functions_registryso that all caches can be cleared withclear_caches().