Cache best practices

From: Date: Mon, 07 Apr 2003 09:40:42 +0000
Subject: Cache best practices
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-9157@lists.php.net to get a copy of this message
Hello, hope you all had a good weekend. I've made a question last week about caching some templates and leave others out from cache. Thank you for your answers but I'm still needing some help. I gave an example. I have a page that's created with five templates: Header, Left, Center, Right and Footer. In the Left template I have user information so it cannot be cached. What's the best aproach to do this ? 1- Use {insert} ? If I use {insert}, how can I read/fetch a template from inside the insert_function ??? 2-Set cache to false ? $smarty= new Smarty; $smarty->display("header.tpl"); $smarty->caching = false; $smarty->display("left.tpl"); $smarty->caching = true; $smarty->display("center.tpl"); $smarty->display("right.tpl"); $smarty->display("footer.tpl") Sorry I'm asking this again but I need to hear from you Smarty gurus, the best way to do it, taking in account performance issues and other factors that may be present and if possible I would like to see some lines of code to explain the solution. Thank you in advance Rui

« previous php.smarty.general (#9157) next »