Skip to content

Commit

Permalink
Solution updated. Chenged key saving
Browse files Browse the repository at this point in the history
  • Loading branch information
lozovoyDanil committed Dec 10, 2024
1 parent 5310d95 commit 6042633
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ def cache(func: Callable) -> Callable:
storage = {}

def inner(*args, **kwargs) -> Any:
key = str(args) + str(kwargs)
key = (args, tuple(sorted(kwargs.items())))
if key in storage:
print("Getting from cache")
return storage[key]
Expand Down

0 comments on commit 6042633

Please sign in to comment.