diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2021-06-08 15:43:13 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2021-06-09 10:01:13 -0400 |
commit | b8ff111975be2b8d2e370f51168e39c7fae44e92 (patch) | |
tree | 2bc531c9be05614605d8b3ef527513c37d8044bd /lib/sqlalchemy/sql/base.py | |
parent | 5a0c700bb96bf2d80cfbf03f5ddfa97964987e4e (diff) | |
download | sqlalchemy-b8ff111975be2b8d2e370f51168e39c7fae44e92.tar.gz |
simplify relationship caching options
Clarified the current purpose of the
:paramref:`_orm.relationship.bake_queries` flag, which in 1.4 is to enable
or disable "lambda caching" of statements within the "lazyload" and
"selectinload" loader strategies; this is separate from the more
foundational SQL query cache that is used for most statements.
Additionally, the lazy loader no longer uses its own cache for many-to-one
SQL queries, which was an implementation quirk that doesn't exist for any
other loader scenario. Finally, the "lru cache" warning that the lazyloader
and selectinloader strategies could emit when handling a wide array of
class/relationship combinations has been removed; based on analysis of some
end-user cases, this warning doesn't suggest any significant issue. While
setting ``bake_queries=False`` for such a relationship will remove this
cache from being used, there's no particular performance gain in this case
as using no caching vs. using a cache that needs to refresh often likely
still wins out on the caching being used side.
Fixes: #6072
Fixes: #6487
Change-Id: Ida61f09b837d3acdafa07344d7d747d7f3ab226a
Diffstat (limited to 'lib/sqlalchemy/sql/base.py')
0 files changed, 0 insertions, 0 deletions