context_cache

dnois.utils.context_cache(func: Callable | str = None)

A decorator to mark a method as cacheable by ContextCache. If called with one argument of type str, it serves as the key of the method. If called with no argument, the key is the name of the method.