diff --git a/app/main.py b/app/main.py index aa84fbd7..093f52bb 100644 --- a/app/main.py +++ b/app/main.py @@ -4,11 +4,13 @@ def cache(func: Callable) -> Any: results = {} - def wrapper(*args, **kwargs) -> Any: + def wrapper(*args) -> Any: if args in results: - print(f"Getting from cache {results[args]}") + print("Getting from cache") + return results[args] else: result = func(*args) results[args] = result - print(f"Calculating new result {result}") + print("Calculating new result") + return result return wrapper