Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Maybe you want to explicit more precisely what you want to cache. You have all this opportunities to cache: </p> <ul> <li><b>Accessing the Data Base</b> where you cache the data first correctly tuning your RDBMS, then using a layer to delegate the decision to detect multiple queries for the same data (with <a href="http://adodb.sourceforge.net/" rel="nofollow noreferrer">AdoDB</a> for example.)</li> <li><b>Extracting calculations from loops in the code</b> so you don't compute the same value multiple times. <i>Here your third way: storing results in the session for the user.</i></li> <li><b>Precompiling the PHP code</b> with an extension like <a href="http://pecl.php.net/package/APC" rel="nofollow noreferrer">APC Cache</a>. This way you don't have to compile the same PHP code for every request.</li> <li><b>The page sent to the user</b> making sure you're setting the right META tags (do a good thing for the world and don't use ETL at least absolutly necessary); or maybe making dynamic pages completely static (having a batch process that generates .html pages); or by using a proxy cache like <a href="http://www.squid-cache.org/" rel="nofollow noreferrer">Squid</a>.</li> <li><b>Prefetching</b> and by this I refer all those opportunities you have to improve the user experience just by doing things while the user don't look your way. For example, preloading IMG tags in the HTML file, tunning the RDBMS for prefectching, precomputing results storing complex computations in the database, etc. </li> </ul> <p>From my experience, I'd bet you that your code can be improved a lot before we start to talk about caching things. Consider, for example, how well structured is the navigation of your site and how well you control the user experience. Then check your code with a tool like <a href="http://xdebug.org/" rel="nofollow noreferrer">XDebug</a>. </p> <p>Verify also how well are you making your SQL queries and how well are you indexing your tables. Then check your code again to look for opportunities to apply the rule "read many times but write just once"</p> <p>Use a simple tool like <a href="http://developer.yahoo.com/yslow/" rel="nofollow noreferrer">YSlow</a> to hint other simple things to improve. Check your code again looking for opportunities to put logic in the browser (via JavaScript)</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload