<br><br><div><span class="gmail_quote">On 3/7/07, <b class="gmail_sendername">AjK</b> <<a href="mailto:andy@pingv.com">andy@pingv.com</a>> 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>> If you'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't strike me as a big payoff for<br>> 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>"constructed". 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'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's<br>what this thread is about, isn'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> 800-618-8777phone / 858-225-0479 fax<br> <a href="http://www.achieveinternet.com">www.achieveinternet.com</a><br> <a href="mailto:steve@achieveinternet.com">
steve@achieveinternet.com</a><br><br> Achieve Internet is a Division of<br> Web Page Maintenance, Inc.