On Tue, Mar 2, 2010 at 1:12 AM, Petko Yotov <span dir="ltr">&lt;<a href="mailto:5ko@5ko.fr">5ko@5ko.fr</a>&gt;</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">
&gt; operations to accept a parameter disabling the caching operation for<br>
&gt; that call. I haven&#39;t looked too much in to the feasibility of this, and<br>
&gt; suspect it would might be a complex change to make, but it would at<br>
&gt; least be transparent to existing code, and provide an option in cases<br>
&gt; where we need to allow subsequent changes to objects.<br>
<br>
</div>&gt; Longer-term: It seems like it would make sense for functions which cache<br>Yes it would be quite complicated, I&#39;m also not sure if we could do this<br>
reliably -- we wouldn&#39;t know what to do if the page has(n&#39;t) already been read<br>
and cached.<br><br></blockquote><div><br>I, too, have been frustrated by the &quot;static $acache;&quot; at times...  (I&#39;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,&#39;$Group/GroupAttributes&#39;);<br>  SDV($AllowPassword,&#39;nopass&#39;);<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 ? &amp;$bcache : $bcache);<br>  // below this no changes are necessary, I believe...<br>
  SDV($GroupAttributesFmt,&#39;$Group/GroupAttributes&#39;);<br>  SDV($AllowPassword,&#39;nopass&#39;);<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>