Skip to content

What is the practical benefit of using @cached_property? #2408

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

Closed
1 task done
0z0sk0 opened this issue Jun 11, 2025 · 1 comment
Closed
1 task done

What is the practical benefit of using @cached_property? #2408

0z0sk0 opened this issue Jun 11, 2025 · 1 comment

Comments

@0z0sk0
Copy link

0z0sk0 commented Jun 11, 2025

Confirm this is a feature request for the Python library and not the underlying OpenAI API.

  • This is a feature request for the Python library

Describe the feature or improvement you're requesting

As i know, cached_property decorator dont spread on a http requests. So, what is the practical benefit of using this everywhere?

Additional context

No response

@RobertCraigie
Copy link
Collaborator

cached_property decorator dont spread on a http requests

what do you mean here?


we use cached_property so that we can both lazily instantiate classes and share them to avoid creating many new instances.

@RobertCraigie RobertCraigie closed this as not planned Won't fix, can't repro, duplicate, stale Jun 11, 2025
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

2 participants