Closed dongfengweixiao closed 1 year ago
Hello @dongfengweixiao please check this https://github.com/zhanymkanov/fastapi-best-practices#5-decouple--reuse-dependencies-dependency-calls-are-cached I do not think that this is needed due to get_current_user is used as a dependency.
Hello @dongfengweixiao please check this https://github.com/zhanymkanov/fastapi-best-practices#5-decouple--reuse-dependencies-dependency-calls-are-cached I do not think that this is needed due to get_current_user is used as a dependency.
THANK your replay, this url have some very valuable information.
I think use redis cache some user info is a good idea, it avoid get_current_user frequent database access, but the design is a little complicated, and I'm considering the details. What do you think about this? @jonra1993