Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#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)

20513.diff (1.7 KB ) - added by David Seddon 12 years ago.

Download all attachments as: .zip

Change History (7)

by David Seddon, 12 years ago

Attachment: 20513.diff added

comment:1 by David Seddon, 12 years ago

Cc: Seddon added
Has patch: set

comment:2 by David Seddon, 12 years ago

Easy pickings: set

comment:3 by Baptiste Mispelon, 12 years ago

Cc: bmispelon@… added
Triage Stage: UnreviewedAccepted

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.

comment:4 by Tim Graham, 12 years ago

Triage Stage: AcceptedReady for checkin

This looks good to me as well. I've wrapped the lines and made some minor edits.

comment:5 by Tim Graham <timograham@…>, 12 years ago

Resolution: fixed
Status: newclosed

In 8365d76da01af1d4391cba32d62178791d074b06:

Fixed #20513 - Expanded docs on QuerySet caching.

Thanks seddonym.

comment:6 by Tim Graham <timograham@…>, 12 years ago

In 2e026739dcab545703160456503a1183c6c0702d:

[1.5.X] Fixed #20513 - Expanded docs on QuerySet caching.

Thanks seddonym.

Backport of 8365d76da0 from master

Note: See TracTickets for help on using tickets.
Back to Top