Forums / General / Cache-block Expiry vs. set-block scope=root variable=cache_ttl
Alex Jones
Monday 08 March 2004 9:36:51 am
I am curious as to whether it is more efficient to use a cache block with an expiry in the page layout, or to use the set-block within a file that is pulled via an include from the page layout. For example, I could use either of the two following methods to call an include that should change every two hours:<b>In <i>pagelayout.tpl</i></b>
{cache-block expiry=7200} {include uri="design:rotating_header.tpl"} {/cache-block}
<b>In <i>rotating_header.tpl</i> (instead of using the above cache-block)</b>
{set-block scope=root variable=cache_ttl}7200{/set-block}
They both do the same thing, but I am curious if page rendering will be any faster with one, than the other.
Alex
Alex [ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ] <i>When in doubt, clear the cache.</i>
Wednesday 10 March 2004 11:13:31 am
Anyone?
Paul Borgermans
Wednesday 10 March 2004 11:44:38 am
Hi Alex
I think the first one will be a bit faster (the include call overhead), but why don't you check the performance yourself?
-paul
eZ Publish, eZ Find, Solr expert consulting and training http://twitter.com/paulborgermans
Wednesday 10 March 2004 12:11:14 pm
Thanks for your thoughts on this Paul.Your explanation makese sens.
I would check the performance myself except for the fact that my installation doesn't respond when I enable debugging. Rather annoying to say the least. Check this thread for more info on that: http://ez.no/community/forum/setup_design/frustrating_debug_issue
Thanks again,