[pmwiki-users] Group name based $XLLangs (multilanguage Wiki)?
Patrick R. Michaud
pmichaud at pobox.com
Sun May 22 15:17:27 CDT 2011
On Sun, May 22, 2011 at 09:07:43PM +0200, Peter Bowers wrote:
> On Sun, May 22, 2011 at 8:19 PM, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> > The correct solution for getting/setting the group and
> > pagename in config.php is already given at
> > http://www.pmwiki.org/wiki/PmWiki/LocalCustomizations#configphp-group-page
> > ## Get the group and page name
> > $pagename = ResolvePageName($pagename);
> > $page = PageVar($pagename, '$FullName');
> > $group = PageVar($pagename, '$Group');
> > $name = PageVar($pagename, '$Name');
> Am I mistaken in thinking that we've periodically run into
> difficulties with this solution related to caching?
> ResolvePageName calls MakePageName which calls FmtPagename which calls
> PageVar which (a) calls PCache() (first problem) and (b) also calls
> PageTextVar which calls RetrieveAuthPage which normally calls
> PmWikiAuth (second problem).
ResolvePageName (and its calls to MakePageName) doesn't normally
expect to be using variables that would cause any caching issues.
In fact, it doesn't expect to be doing any page reads at all --
it expects to be able to resolve a pagename using just the information
in a url. I'm having trouble imagining a situation where converting
a url to a pagename requires the use of PageTextVars, or the actual
reading and caching of a page file.
That said, just because I can't imagine it right now doesn't mean
it won't happen for some configurations. I don't think it would be
a problem at all to have ResolvePageName also clear the caches after
it's done its work, or to disable the caches altogether until
some "we've reached a stable configuration point" is reached (e.g.,
at the beginning of stdconfig.php).
> PITS/01177 is related.
This answer would seem to also address #01177.
More information about the pmwiki-users