Opened 16 years ago

Closed 16 years ago

#6201 closed (fixed)

Improved cache tag to allow timeout to be a template variable

Reported by: zz <zodizz@…> Owned by:
Component: Template system Version: dev
Severity: Keywords: template caching
Cc: stefan@… 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

from ticket:1065

Somehow the idea of having cache time spread all over the place seems a bit cluttering especially if you use the tag more frequently throughout templates. Having the timeout in a single variable is helpful.

The patch allows the timeout to be a template variable and also adds some extra tests.

Attachments (2)

cache_tag.diff (4.3 KB ) - added by zz <zodizz@…> 16 years ago.
Improved tag to accept time as variable
cache_tag2.diff (4.8 KB ) - added by Fredrik Sjöblom 16 years ago.
Updated the patch and added a line to the docs

Download all attachments as: .zip

Change History (7)

by zz <zodizz@…>, 16 years ago

Attachment: cache_tag.diff added

Improved tag to accept time as variable

comment:1 by Matt McClanahan, 16 years ago

Triage Stage: UnreviewedDesign decision needed

comment:2 by Chris Beaven, 16 years ago

Owner: changed from nobody to Chris Beaven
Status: newassigned
Triage Stage: Design decision neededReady for checkin

I don't think a design decision is necessary. This is useful functionality and it's backwards compatible.

comment:3 by Chris Beaven, 16 years ago

Owner: Chris Beaven removed
Status: assignednew

comment:4 by anonymous, 16 years ago

Cc: stefan@… added

I really think this is necessary, I was thinking of doing this if I hadn't found this ticket.
Please check it in ;)

by Fredrik Sjöblom, 16 years ago

Attachment: cache_tag2.diff added

Updated the patch and added a line to the docs

comment:5 by Adrian Holovaty, 16 years ago

Resolution: fixed
Status: newclosed

(In [7754]) Fixed #6201 -- Improved the {% cache %} template tag to allow the timeout to be a template variable. Inspired by the patch by zz and edrik

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