#18435: Caching of reverse ForeignKey lookups
----------------------------------------------+--------------------
     Reporter:  selwin                        |      Owner:  nobody
         Type:  Cleanup/optimization          |     Status:  new
    Component:  Database layer (models, ORM)  |    Version:  1.4
     Severity:  Normal                        |   Keywords:
 Triage Stage:  Unreviewed                    |  Has patch:  0
Easy pickings:  0                             |      UI/UX:  0
----------------------------------------------+--------------------
 Currently ForeignKey
 (https://docs.djangoproject.com/en/dev/topics/db/queries/#one-to-many-
 relationships) lookups (https://code.djangoproject.com/ticket/14270) are
 cached. Does it make sense to cache reverse ForeignKey lookups as well?
 Currently the following results in two queries:

 {{{
 author.book_set.all()[0] # db query
 author.book_set.all()[0] # another db query
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/18435>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to