<br><br><div><span class="gmail_quote">On 3/7/07, <b class="gmail_sendername">Metzler, David</b> &lt;<a href="mailto:metzlerd@evergreen.edu">metzlerd@evergreen.edu</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>If you&#39;re talking about object caching where in 90% of the cases the<br>objects live in the database, I wonder whether this kind of caching<br>would have a better payoff than just increasing the memory caching done
<br>by the DB engine (mysql,etc). It doesn&#39;t strike me as a big payoff for<br>the code that it would take too achieve.</blockquote><div><br>The main issue here is that building the node object by invoking a lot of expensive select and joins is a real slowdown in my testing.&nbsp; Not to mention that real world query caching does not get you very far on a heavily trafficked website. 
<br><br>The other part of this that is missing is that in a multi-server environment using memcached as a shared cache allows you to only need to build the node objects once per farm of servers before it is cleared or rebuilt based on max life.&nbsp; With file based caching you have to do it on every server.&nbsp; (Obviously you could do this on a NFS&#39;d file system, but that would negate a lot of the speed)
<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I&#39;d recommend general caching drupal caching API&#39;s should be restricted
<br>to &quot;rendered&quot; objects, such as the output of a block, a view, or a menu.<br>Then you save the expensive rendering process. If you&#39;re just talking<br>about object data, let the database engines do the caching.
</blockquote><div><br>I would agree that these would are good places to cache as well, but using eAccelerator or APC you can significantly speed up the time it takes php to build the rendered output from the object.&nbsp; I haven&#39;t seen the rendering to be all that significant.&nbsp; I still need to do some more testing however.
<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Of course it does make sense to cache XMLRPC call results and other<br>expensive data gets.
<br><br>It seems really odd to talk about caching nodes in a database, when<br>nodes and users are in a database to begin with?</blockquote><div><br>As Andy pointed out already (sorry I was late to jump on this), nodes don&#39;t live in one table.&nbsp; The biggest problem in addition to the other tables that get queried to build the nodes, is the node &gt; node_revisions join that happens.&nbsp; In our experience with an active site with user contributed data, the node_revisions table can get big very fast.&nbsp; 
<br><br><br><br></div></div><br>-- <br><br>Steve Rude<br>Lead Web Developer<br><br>&nbsp;&nbsp;&nbsp;&nbsp;800-618-8777phone / 858-225-0479 fax<br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.achieveinternet.com">www.achieveinternet.com</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="mailto:steve@achieveinternet.com">
steve@achieveinternet.com</a><br><br>&nbsp;&nbsp;&nbsp;&nbsp;Achieve Internet is a Division of<br>&nbsp;&nbsp;&nbsp;&nbsp;Web Page Maintenance, Inc.