8000 🐛 Cache dependencies that don't use scopes and don't have sub-dependencies with scopes by tiangolo · Pull Request #14419 · fastapi/fastapi · GitHub
[go: up one dir, main page]

Skip to content

Conversation

@tiangolo
Copy link
Member

🐛 Cache dependencies that don't use scopes and don't have sub-dependencies with scopes

Related to #9790, and #6024

Uses the ideas in @YuriiMotov's diagrams here for the tests: #6024 (comment)


Dependencies are cached based on the function. And also on the scopes, but (now) only when those scopes are used by this dependency or by a sub-dependency: this dependency or a sub-dependency declare scopes or access the SecurityScopes.

@tiangolo tiangolo added the bug Something isn't working label Nov 30, 2025
@tiangolo tiangolo merged commit 7fbd304 into master Nov 30, 2025
32 checks passed
@tiangolo tiangolo deleted the security-scopes branch November 30, 2025 14:45
@tiangolo
Copy link
Member Author

This is now released as FastAPI 0.123.0 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0