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