skfolio.utils.tools.cache_method#
- skfolio.utils.tools.cache_method(cache_name)[source]#
Decorator that caches class method results into a class dictionary.
Cache keys are built from the raw positional and keyword arguments, so cached methods should use positional-only parameters (
/) when callers could otherwise mix positional and keyword forms.- Parameters:
- cache_namestr
Name of the dictionary class attribute.
- Returns:
- funcCallable
Decorating function that caches class methods.