Django

Code

Ticket #6201 (closed: fixed)

Opened 10 months ago

Last modified 4 months ago

Improved cache tag to allow timeout to be a template variable

Reported by: zz <zodizz@gmail.com> Assigned to:
Milestone: Component: Template system
Version: SVN Keywords: template caching
Cc: stefan@musicpictures.com Triage Stage: Ready for checkin
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

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

cache_tag.diff (4.3 kB) - added by zz <zodizz@gmail.com> on 12/13/07 03:53:41.
Improved tag to accept time as variable
cache_tag2.diff (4.8 kB) - added by edrik on 06/13/08 12:04:40.
Updated the patch and added a line to the docs

Change History

12/13/07 03:53:41 changed by zz <zodizz@gmail.com>

  • attachment cache_tag.diff added.

Improved tag to accept time as variable

12/15/07 15:04:59 changed by mattmcc

  • needs_better_patch changed.
  • stage changed from Unreviewed to Design decision needed.
  • needs_tests changed.
  • needs_docs changed.

12/21/07 15:27:11 changed by SmileyChris

  • owner changed from nobody to SmileyChris.
  • status changed from new to assigned.
  • stage changed from Design decision needed to Ready for checkin.

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

01/03/08 01:45:34 changed by SmileyChris

  • owner deleted.
  • status changed from assigned to new.

04/04/08 10:40:30 changed by anonymous

  • cc set to stefan@musicpictures.com.

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

06/13/08 12:04:40 changed by edrik

  • attachment cache_tag2.diff added.

Updated the patch and added a line to the docs

06/25/08 23:54:11 changed by adrian

  • status changed from new to closed.
  • resolution set to fixed.

(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


Add/Change #6201 (Improved cache tag to allow timeout to be a template variable)




Change Properties
Action