On Tue, Mar 2, 2010 at 1:12 AM, Petko Yotov <5...@5ko.fr> wrote: > > > operations to accept a parameter disabling the caching operation for > > that call. I haven't looked too much in to the feasibility of this, and > > suspect it would might be a complex change to make, but it would at > > least be transparent to existing code, and provide an option in cases > > where we need to allow subsequent changes to objects. > > > Longer-term: It seems like it would make sense for functions which cache > Yes it would be quite complicated, I'm also not sure if we could do this > reliably -- we wouldn't know what to do if the page has(n't) already been > read > and cached. > > I, too, have been frustrated by the "static $acache;" at times... (I'm assuming this is the caching you are concerned about...)
I *believe* (completely untested) that this change would allow a global $EnableAuthCache which could be turned off during config.php as needed... ===from this=== function PmWikiAuth($pagename, $level, $authprompt=true, $since=0) { global $DefaultPasswords, $GroupAttributesFmt, $AllowPassword, $AuthCascade, $FmtV, $AuthPromptFmt, $PageStartFmt, $PageEndFmt, $AuthId, $AuthList, $NoHTMLCache; static $acache; SDV($GroupAttributesFmt,'$Group/GroupAttributes'); SDV($AllowPassword,'nopass'); ===to this=== function PmWikiAuth($pagename, $level, $authprompt=true, $since=0) { global $DefaultPasswords, $GroupAttributesFmt, $AllowPassword, $AuthCascade, $FmtV, $AuthPromptFmt, $PageStartFmt, $PageEndFmt, $AuthId, $AuthList, $NoHTMLCache; // changes start here global $EnableAuthCache; // included in the line above - put here for clarity static $bcache; // probably ought to be a more sensible name :-) SDV($EnableAuthCache, true); $acache = ($EnableAuthCache ? &$bcache : $bcache); // below this no changes are necessary, I believe... SDV($GroupAttributesFmt,'$Group/GroupAttributes'); SDV($AllowPassword,'nopass'); ===end=== *If* this works I would love to see this capability. Having the static definition with no control at all is often very limiting... -Peter
_______________________________________________ pmwiki-devel mailing list pmwiki-devel@pmichaud.com http://www.pmichaud.com/mailman/listinfo/pmwiki-devel