﻿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
24702	Cache Query objects when possible	Omer Katz	nobody	"Currently Django constructs the Query objects every time you query the database.
This is often unnecessary and can be avoided.
I started memoizing some of the Query objects that the manager creates but I encountered some test failures related to prefetch_related querysets.
This is the memoized manager implementation https://github.com/thedrow/django/blob/feature/memoized-manager/django/db/models/manager.py#L244 
I'm not sure it should be in a separate class but I created another one because of some of the required API changes.
Can anyone explain the test failures?"	Cleanup/optimization	closed	Database layer (models, ORM)	dev	Normal	needsinfo			Accepted	1	0	0	1	0	0
