<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">Hi,<br><br>in app.publication.zopepublication.py there are 2 methods.<br>Maybe they are invoked in different scenarios, I am not sure.<br>But at least one PAU auth for each request.<br><br>&nbsp;&nbsp;&nbsp; def callTraversalHooks(self, request, ob):<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # Call __before_publishing_traverse__ hooks<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; notify(BeforeTraverseEvent(ob, request))<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # This is also a handy place to try and authenticate.<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self._maybePlacefullyAuthenticate(request, ob)<br><br>&nbsp;&nbsp;&nbsp; def afterTraversal(self, request,
 ob):<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #recordMetaData(object, request)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self._maybePlacefullyAuthenticate(request, ob)<br><br><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">----- Original Message ----<br>From: Roger Ineichen &lt;dev@projekt01.ch&gt;<br>To: nixon &lt;nxnth@yahoo.com.cn&gt;; zope3-users@zope.org<br>Sent: Wednesday, April 30, 2008 11:26:31 AM<br>Subject: AW: [Zope3-Users] efficiency of PAU authentication<br><br>
Hi Nixon<br><br>&gt; Betreff: [Zope3-Users] efficiency of PAU authentication<br>&gt; <br>&gt; Hi, dear all,<br>&gt; <br>&gt; PAU authenticates 2 times each request, before and after traversal.<br><br>Really? <br>Can you explain why this happens?<br><br>&gt; What if I make an authentication plugin based on relational database?<br>&gt; Everytime the plugin has to create a pricipal from database, <br>&gt; assign roles to it, ...<br>&gt; When the website is under heavy load, there must be huge <br>&gt; number of authentication request.<br>&gt; Is RDB based PAU efficient enough to do authentication?<br>&gt; <br>&gt; I have an idea of session-cache authentication: fetch <br>&gt; credentials from RDB and cache them in session. Is this more <br>&gt; efficient?<br><br>Yes, of corse, I recommend caching if you need to run a heavy loaded site.<br><br>Regards<br>Roger Ineichen<br><br>&gt; Best Regards<br>&gt; Nixon<br>&gt; <br>&gt; <br>&gt;
 ________________________________<br>&gt; <br>&gt; ÑÅ»¢ÓÊÏ䣬ÄúµÄÖÕÉúÓÊÏ䣡 &lt;<a href="http://cn.mail.yahoo.com/" target="_blank">http://cn.mail.yahoo.com/</a>&gt; <br>&gt; <br><br></div><br></div></div><br>

      <hr size=1>Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile. <a href="http://us.rd.yahoo.com/evt=51733/*http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ "> Try it now.</a></body></html>