[Pmwiki-users] FmtPageName caching ?
Patrick R. Michaud
Tue Nov 9 06:39:41 CST 2004
On Tue, Nov 09, 2004 at 11:30:28AM +0100, Knut Alboldt wrote:
> I had a short look on the FmtPageName-function and saw a code section that
> looks li9ke that the globals are caches unless the number of globals have
> not been changed ($GCount). Is this right ?
That's right, because the process of searching for valid global
variables is a bit time consuming. In PmWiki 2 you can use the $FmtV
array to hold variable substitutions that frequently change, as in
$FmtV['$myglobalvar'] = 'value';
> Or just incrementing (global) GCount in our function (I did
> this as a workaround) ?
Better is to just set $GCount to zero. PmWiki will recompute $GCount when
it rebuilds the variable cache.
More information about the pmwiki-users