#18435: Caching of reverse ForeignKey lookups -------------------------------------+------------------------------------- Reporter: selwin | Owner: nobody Type: | Status: closed Cleanup/optimization | Version: 1.4 Component: Database layer | Resolution: invalid (models, ORM) | Triage Stage: Severity: Normal | Unreviewed Keywords: | Needs documentation: 0 Has patch: 0 | Patch needs improvement: 0 Needs tests: 0 | UI/UX: 0 Easy pickings: 0 | -------------------------------------+------------------------------------- Changes (by aaugustin):
* status: new => closed * needs_docs: => 0 * resolution: => invalid * needs_tests: => 0 * needs_better_patch: => 0 Comment: There's a misunderstanding somewhere; your example isn't related to #14270. This will do two requests: {{{ Book.objects.get(id=1) Book.objects.get(id=1) }}} and so will this: {{{ author.book_set.get(id=1) author.book_set.get(id=1) }}} and so will this: {{{ author.book_set.all() author.book_set.all() }}} This is the expected behavior, really. (And we can't change it easily, since people are relying on this to reload objects whose state may have changed from the database). -- Ticket URL: <https://code.djangoproject.com/ticket/18435#comment:1> 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.