#20513 closed Cleanup/optimization (fixed)
Queryset caching behaviour needs more documentation
Reported by: | David Seddon | Owned by: | nobody |
---|---|---|---|
Component: | Documentation | Version: | dev |
Severity: | Normal | Keywords: | queryset |
Cc: | Seddon, bmispelon@… | Triage Stage: | Ready for checkin |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | no |
Description
The documentation for the caching behaviour of querysets is misleading. It implies that queryset results are always cached, but in actual fact the cache is only set if the entire queryset is evaluated - not when a section of the queryset is queried (such as a call to queryset[3]).
I will attach a patch documenting this behaviour shortly.
Attachments (1)
Change History (7)
by , 12 years ago
Attachment: | 20513.diff added |
---|
comment:1 by , 12 years ago
Cc: | added |
---|---|
Has patch: | set |
comment:2 by , 12 years ago
Easy pickings: | set |
---|
comment:3 by , 12 years ago
Cc: | added |
---|---|
Triage Stage: | Unreviewed → Accepted |
comment:4 by , 12 years ago
Triage Stage: | Accepted → Ready for checkin |
---|
This looks good to me as well. I've wrapped the lines and made some minor edits.
comment:5 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
This looks useful and the proposed patch looks pretty good (
git apply
complains about trailing whitespace on line 25 though).I'm marking this as accepted.
I would mark it as ready for checkin too, but I feel this should get reviewed by a native speaker (which I'm not).
Thanks for your contribution.