Code

#19372 closed New feature (wontfix)

{% include %} should accept a caching parameter

Reported by: italo maia Owned by: nobody
Component: Template system Version: 1.4
Severity: Normal Keywords: templatetags, include
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Include would do nicely with a cache parameter. Something like this:

{% include "template.html" 10 %} -> caches for 10 seconds

Attachments (0)

Change History (2)

comment:1 Changed 17 months ago by aaugustin

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

While this save a few keystrokes, it's less explicit than the current version:

{% cache 10 included-template %}{% include "template.html" %}{% endcache %}

I don't think the gain in concision is worth the loss in clarity.

comment:2 Changed 17 months ago by russellm

  • Resolution set to wontfix
  • Status changed from new to closed

I agree with Aymeric. Mixing a template structure call (include) with caching infrastructure seems like a bad idea to me.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.