Friday 08 January 2010 9:44:20 am
A couple of hints: - mysql queries might be killing your app. You can find out how many queries are executed per-page by enabling the debug output (it can be done without disabling caches) and looking at the bottom of the page for the table line that reads "Mysql_queries" (or Mysqli_queries). Anything above 100 is plain suicide. Below 10, you'r gold. - disabling view cache on hp is a bad idea, really. You can set it to eg 10 minutes if you want latest news appearing, just not in real time: <span>{</span><a href="http://doc.ez.no/set-block" mce_href="http://doc.ez.no/set-block" target="ez_no_documentation"><span>set-block</span></a> <span>scope</span><span>=</span>root <span>variable</span><span>=</span>cache_ttl<span>}36</span>0<span>{</span><span>/</span><a href="http://doc.ez.no/set-block" mce_href="http://doc.ez.no/set-block" target="ez_no_documentation"><span>set-block</span></a><span>}</span>
You can use a cache block where you put in the "keys" param a random value calculated between eg 1 and 10 if what you want is some random pictures - you will have the cache block executed about 10 times before it is fully warmed, and successive hits will not execute it anymore If your news do not update very often, even better than a periodic expiry is one based on actual linking of content editing action with cached expiration. look up the docs about the "smart view cache" for that - a lot of developers always fetch the current node in the pagelayout, because it is not there and they need just a bit of info from it. Do not do it, use the persistent_variable instead (look it up in the forums/docs) - make sure your cache blocks are properly tuned: if they do not depend on content expiration, use "ignore_content_expiry", if they depend on expiration on a particular node, set it in "subtree_expiry", and do not forget plain "expiry" timeout (http://ez.no/doc/ez_publish/technical_manual/4_x/reference/template_functions/miscellaneous/cache_block)
Principal Consultant International Business
Member of the Community Project Board
|