<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/3.14.1">
</HEAD>
<BODY>
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.&nbsp; 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>
Yes, there's huge benefits to be gained from it.<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?&nbsp; </FONT><BR>
</BLOCKQUOTE>
Using an engine such as Smarty (smarty.php.net) gives you more granular control of caching page elements, but I'm not exactly sure what you want to cache.<BR>
<BLOCKQUOTE TYPE=CITE>
    <BR>
    <FONT COLOR="#000000">So, I'm thinking of using Memcache instead.&nbsp; Now, I can cache the SQL queries, or I can cach that portion of the page (with html rendered).&nbsp; However, if caching that portion, it would mean more internal LAN traffic for every page view request.</FONT><BR>
</BLOCKQUOTE>
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%">
<TR>
<TD>
<TABLE CELLSPACING="3" CELLPADDING="0" WIDTH="100%">
<TR>
<TD COLSPAN="2" VALIGN="top">
<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 COLSPAN="2" VALIGN="top">
<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>
</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>
</TABLE>
</BODY>
</HTML>