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

Using functools.cache instead of global const for caching #9

Open
esciara opened this issue Dec 21, 2023 · 0 comments
Open

Using functools.cache instead of global const for caching #9

esciara opened this issue Dec 21, 2023 · 0 comments

Comments

@esciara
Copy link

esciara commented Dec 21, 2023

Would this example not be a bit out of date ? Wouldn't it have been a cleaner way to cache functions results to use functools.lru_cache, or even functools.cache since python 3.9?

Here is the code for AUDIENCE, but it would apply for KEY in the same file too:

https://github.com/googlecodelabs/user-authentication-with-iap/blob/a077882f979562ed78044e1655d32897a903d059/3-HelloVerifiedUser/auth.py#L37C1-L53C1

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

No branches or pull requests

1 participant