Page MenuHomePhabricator

Add an option to disable template caching
Closed, ResolvedPublic

Description

Author: vlakoff

Description:
When rendering a page, the result of a template with the same given parameters is only calculated the first time, and other same transclusions are taken from a cache.

This is usually fine, but may be undesirable, in rare cases.

For example, consider this case:

lorem ipsum 1<ref>AAA</ref>
{{reflist}}

lorem ipsum 2<ref>BBB</ref>
{{reflist}}

Here, the 2nd transclusion gives a wrong result.

I think it may be nice to implement a keyword, like NOTEMPLATECACHE which, as its name implies, would make template re-rendered. Of course, this option wouldn't (and has not to) be used often, but it would be useful in some edge cases.


Version: unspecified
Severity: enhancement
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=46815

Details

Reference
bz31834

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:57 PM
bzimport set Reference to bz31834.

vlakoff wrote:

Of course, the keyword would have to be added in the template's page.

Change 99792 had a related patch set uploaded by Anomie:
Add PPFrame::isVolatile and PPFrame::setVolatile

https://gerrit.wikimedia.org/r/99792

Change 99793 had a related patch set uploaded by Anomie:
Mark parser hook output as volatile

https://gerrit.wikimedia.org/r/99793

Change 99792 merged by jenkins-bot:
Add PPFrame::isVolatile and PPFrame::setVolatile

https://gerrit.wikimedia.org/r/99792

Change 99793 merged by jenkins-bot:
Mark parser hook output as volatile

https://gerrit.wikimedia.org/r/99793

Templates containing ref or reflist tags will no longer be cached. This change will be live on all WMF wikis starting on June 12th.

MGChecker added a subscriber: MGChecker.

Note that this task wasn't fixed as proposed in the task description, but by adding a option in the parser to mark tags that are problematic in this way.