On 11/04/11 02:51, Daniel Friesen wrote:
On 11-04-10 06:13 PM, Tim Starling wrote:
[...] I think it's fair to constrain parser functions to require that they return the same result for the same arguments, during a single parse operation. That's all you need to do to have an effective expand() cache. [...] -- Tim Starling
That /might/ work nicely for #ask. However Counter, ArrayExtension, Variables, Random, etc... won't play nicely with that.
Perhaps a way for parser functions to opt-in or opt-out. So we can exclude functions that .
Side thought... why a #switch library? What happened to the old {{Foo/{{{1}}}|...}} trick?
~Daniel Friesen (Dantman, Nadir-Seen-Fire) [http://daniel.friesen.name]
I would have thought this could be done automatically, by designating templates as being "pure" or "impure" (in the sense of pure and impure functions) -- something which could be done recursively all the way down to basic parser functions, magic words, etc., which would have to be designated pure or impure by hand as part of the software implementation.
-- Neil