﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
18435	Caching of reverse ForeignKey lookups	Selwin Ong	nobody	"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
}}}

"	Cleanup/optimization	closed	Database layer (models, ORM)	1.4	Normal	invalid		Selwin Ong	Unreviewed	0	0	0	0	0	0
