euroeval.caching_utils
source module euroeval.caching_utils
source cache_arguments(*arguments: str, disable_condition: t.Callable[[], bool] = lambda: False) → t.Callable[[t.Callable[..., T]], t.Callable[..., T]]
Cache specified arguments of a function.
Parameters
-
arguments : str — The list of argument names to cache. If empty, all arguments are cached.
-
disable_condition : t.Callable[[], bool] — A function that checks if cache should be disabled.
Returns
-
t.Callable[[t.Callable[..., T]], t.Callable[..., T]] — A decorator that caches the specified arguments of a function.
Raises
-
ValueError