Opened 12 years ago

Closed 12 years ago

#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

Change History (2)

comment:1 by Aymeric Augustin, 12 years ago

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 by Russell Keith-Magee, 12 years ago

Resolution: wontfix
Status: newclosed

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

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