Opened 17 years ago

Closed 17 years ago

#5284 closed (fixed)

never_cache decorator is not documented

Reported by: Ville Säävuori <ville@…> Owned by: Fernando Gutierrez
Component: Documentation Version: dev
Severity: Keywords: cache, never_cache, sprintsept14
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

While searching docs for how to disable caching, I found that never_cache decorator in django.views.decorators.cache is not documented. It is, however, documented in changeset #2602.

Attachments (2)

never_cache_doc.diff (764 bytes ) - added by Fernando Gutierrez 17 years ago.
Patch for documentation.
never_cache_doc.2.diff (766 bytes ) - added by Fernando Gutierrez 17 years ago.
Respect the line width.

Download all attachments as: .zip

Change History (10)

comment:1 by Simon G. <dev@…>, 17 years ago

Needs documentation: set
Triage Stage: UnreviewedAccepted

Want to write it up?

comment:2 by Ville Säävuori <ville@…>, 17 years ago

I was trying to say that the decoratos _has already been documented_ in changeset 2602 (the link above goes to bug 2602, not changeset) but for some reason it's not there anymore.

A quick copypaste and reformatting resulted in:

If you want to use headers to disable caching altogether, ``django.views.decorators.never_cache`` is a view decorator that adds
headers to ensure the response won't be cached by browsers or other caches. Example::

    from django.views.decorators.cache import never_cache
    @never_cache
    def myview(request):
        ...

Above should go under the heading "Controlling cache: Using other headers".

by Fernando Gutierrez, 17 years ago

Attachment: never_cache_doc.diff added

Patch for documentation.

comment:3 by Fernando Gutierrez, 17 years ago

Has patch: set
Needs documentation: unset
Owner: changed from nobody to Fernando Gutierrez
Status: newassigned

comment:4 by Fernando Gutierrez, 17 years ago

Keywords: sprintsept14 added

comment:5 by Simon G. <dev@…>, 17 years ago

Triage Stage: AcceptedReady for checkin

comment:6 by Ville Säävuori, 17 years ago

I think the included hasn't got proper line length. It shoud be easy to correct after applying the patch, though.

by Fernando Gutierrez, 17 years ago

Attachment: never_cache_doc.2.diff added

Respect the line width.

comment:7 by Fernando Gutierrez, 17 years ago

I have attached a new diff that respects the line length.

comment:8 by Adrian Holovaty, 17 years ago

Resolution: fixed
Status: assignedclosed

(In [6308]) Fixed #5284 -- Documented never_cache decorator. Thanks, xbito

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