Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

solution #1442

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

solution #1442

wants to merge 2 commits into from

Conversation

10kkyvl
Copy link

@10kkyvl 10kkyvl commented Dec 2, 2024

No description provided.

app/main.py Outdated
Comment on lines 12 to 19
if key in cached:
print("Getting from cache")
return cached[key]

print("Calculating new result")
result = func(*args, **kwargs)
cached[key] = result
return result
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

try to rewrite your decorator not to have return duplicated

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

got it, commited fix

@10kkyvl 10kkyvl requested a review from L1nk3rrr December 16, 2024 13:50
Copy link

@L1nk3rrr L1nk3rrr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants