Skip to content

Commit

Permalink
Fixed using additional variable
Browse files Browse the repository at this point in the history
  • Loading branch information
petrykivd authored Oct 2, 2023
1 parent 20e527b commit 3ab8c25
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 @@ -8,8 +8,7 @@ def wrapper(*args) -> Any:
if args in cache_dict:
print("Getting from cache")
else:
new_result = func(*args)
cache_dict[args] = new_result
cache_dict[args] = func(*args)
print("Calculating new result")
return cache_dict[args]
return wrapper

0 comments on commit 3ab8c25

Please sign in to comment.