<br><br><div><span class="gmail_quote">On 3/7/07, <b class="gmail_sendername">AjK</b> &lt;<a href="mailto:andy@pingv.com">andy@pingv.com</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><br>&gt; If you&#39;re talking about object caching where in 90% of the cases the<br>&gt; objects live in the database, I wonder whether this kind of caching<br>&gt; would have a better payoff than just increasing the memory caching done
<br>&gt; by the DB engine (mysql,etc). It doesn&#39;t strike me as a big payoff for<br>&gt; the code that it would take too achieve.<br><br>90% may well live in the database but in a disparate way. Nodes are<br>&quot;constructed&quot;. If you have say 10 modules all adding their own unique
<br>goodness to the $node object via hook_load() or hook_nodeapi() then there&#39;s<br>a lot of database queries going on during that construction process. Add to<br>that the PHP overhead of calling all those hooks during the construction
<br>phase then the db layer caching starts to become minor even though still<br>beneficial.<br><br>If you can cache the resulting constructed object into a memcache (or file,<br>whatever) you save yourself all that construction overhead. You can just
<br>quickly recover the ready assembled object from cache. Expiring the cache<br>can be done in node_save() and the next node_load() reconstructs/caches the<br>node again. Same for user and comment objects. Cache expiry when adding a
<br>new module (or removing one) would be needed also.<br><br>But getting a cache set-up like this can have great benefits. I think that&#39;s<br>what this thread is about, isn&#39;t it?<br><br>--Andy<br><br></blockquote>
</div><br>Exactly!<br clear="all"><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.