mirror of
https://github.com/Hopiu/django-cachalot.git
synced 2026-05-10 05:34:45 +00:00
Use table names instead of aliases to prevent unnecessary cache sets.
This commit is contained in:
parent
9ff71ac2e9
commit
6dc06ab9b9
1 changed files with 2 additions and 1 deletions
|
|
@ -89,7 +89,8 @@ def _get_table_cache_keys(compiler):
|
|||
query = compiler.query
|
||||
using = compiler.using
|
||||
|
||||
tables = set(query.tables)
|
||||
tables = set([join_info.table_name
|
||||
for join_info in query.alias_map.values()])
|
||||
tables.add(query.model._meta.db_table)
|
||||
if query.extra_select or any([isinstance(c, ExtraWhere)
|
||||
for c in query.where.children]):
|
||||
|
|
|
|||
Loading…
Reference in a new issue