summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql/base.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2021-06-08 15:43:13 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2021-06-09 10:01:13 -0400
commitb8ff111975be2b8d2e370f51168e39c7fae44e92 (patch)
tree2bc531c9be05614605d8b3ef527513c37d8044bd /lib/sqlalchemy/sql/base.py
parent5a0c700bb96bf2d80cfbf03f5ddfa97964987e4e (diff)
downloadsqlalchemy-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