Skip to content

Commit

Permalink
Fix Solution
Browse files Browse the repository at this point in the history
  • Loading branch information
Ded31 committed Sep 24, 2023
1 parent eff668c commit ef35f29
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ def wrapper(*args, **kwargs) -> Callable:
if parameters in cache_dict:
print("Getting from cache")
return cache_dict[parameters]
else:
if parameters not in cache_dict:
print("Calculating new result")
cache_dict[parameters] = func(*args, **kwargs)
return cache_dict[parameters]

return wrapper

0 comments on commit ef35f29

Please sign in to comment.