<div>Using an engine such as Smarty (<a onclick="return top.js.OpenExtLink(window,event,this)" href="http://smarty.php.net/" target="_blank">smarty.php.net</a>) gives you more granular control of caching page elements, but I'm not exactly sure what you want to cache.
</div>
<blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
<div>I'm looking to cache things like, "recently logged in members", or "latest blog posts". Would it be best to use Smarty for this? Or Memcache? With Memcache, all web servers will be able to obtain the same data, whereas with Smarty, each web server would have to cache its own.
<span class="gmail_quote"></span></div></blockquote>
<div><span class="gmail_quote"><span class="gmail_quote">Often SQL query caching isn't hugely beneficial as your database server most likely caches pretty well. Caching HTML portions to reduce database queries will most likely give you a huge performance benefit.
</span></span></div>
<blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
<div><span class="gmail_quote"><span class="gmail_quote">I'm not understanding you here. Do you mean, it can speed things up a lot if I cache the end result HTML portion in Memcache?</span></span></div></blockquote>
<div><span class="gmail_quote"></span> </div>
<div><span class="gmail_quote">On 7/30/07, <b class="gmail_sendername">Rob Sharp</b> <<a href="mailto:rob.sharp@thesoundalliance.net">rob.sharp@thesoundalliance.net</a>> wrote:</span></div>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div><span class="q">On Mon, 2007-07-30 at 11:44 +0800, K J wrote:<br>
<blockquote type="CITE"><font color="#000000">There are portions of my PHP application that updates every 5 minutes or so. Thus I think it's a great candidate for caching, as opposed to having the server refresh that portion every time there's a query.
</font><br></blockquote></span>Yes, there's huge benefits to be gained from it.<span class="q"><br>
<blockquote type="CITE"><br><font color="#000000">As far as I'm aware, there isn't a PHP partial page caching available is there? </font><br></blockquote></span>Using an engine such as Smarty (<a onclick="return top.js.OpenExtLink(window,event,this)" href="http://smarty.php.net/" target="_blank">
smarty.php.net</a>) gives you more granular control of caching page elements, but I'm not exactly sure what you want to cache.<span class="q"><br>
<blockquote type="CITE"><br><font color="#000000">So, I'm thinking of using Memcache instead. Now, I can cache the SQL queries, or I can cach that portion of the page (with html rendered). However, if caching that portion, it would mean more internal LAN traffic for every page view request.
</font><br></blockquote></span>Often SQL query caching isn't hugely beneficial as your database server most likely caches pretty well. Caching HTML portions to reduce database queries will most likely give you a huge performance benefit.
<br><br>Do you currently have issues with LAN traffic that make you think using memcache will be a problem? You need to move a lot of data around to saturate a gigbit switch.<br><br>You may also consider a sole memcache instance per web server, whereby traffic would not leave the server, which may help if you have network saturation issues.
<br><br>Thanks,<br>Rob.<br><br>
<table cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td>
<table cellspacing="3" cellpadding="0" width="100%">
<tbody>
<tr>
<td valign="top" colspan="2"><b><font size="2"><font color="#333333">Rob Sharp</font></font></b><br><font size="1"><font color="#ce4a84">Development Lead </font></font><br><br><b><font size="1">telephone:</font></b><font size="1">
02 9282 4049</font><br><b><font size="1">facsimile:</font></b><font size="1"> 02 9282 4099</font><br><b><font size="1">skype:</font></b><font size="1"> qu4nnum</font><br><br><br><br></td></tr>
<tr>
<td valign="top" colspan="2"><font size="2"><font color="#333333">Sound Alliance </font></font><br><font size="1"><font color="#ce4a84">inthemix : FasterLouder : Thought By Them : SameSame</font></font> </td></tr></tbody>
</table><br><br><font size="2"><font color="#339966">100% recycled electrons were used for the composition of this email </font></font><br><font size="2"><font color="#339966">- please don't print it unless you need to!
</font></font> </td></tr></tbody></table></div></blockquote><br>