Re:Re:Re:[BEGINNER] Question about caching

From: Date: Fri, 28 Dec 2001 22:17:46 +0000
Subject: Re:Re:Re:[BEGINNER] Question about caching
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-2422@lists.php.net to get a copy of this message
On Fri, 28 Dec 2001, Brian E. Lozier wrote: > The main template doesn't include another template. The main template has a {$Content} > field that my > application populates depending on what page you're accessing. > > *ALL* my $tpl->display() calls (on every single one of my pages) look like: > > $tpl->display('main.tpl'); > > > At the end of EVERY page in my application.  Because 'main.tpl' contains my entire design. > > [html][body] > {$Content} > [/body][/html] > > Then I populate {Content} with a $tpl->fetch() command, such as: > > $tpl->assign('Content', $tpl->fetch('userregister.tpl')); > or on a different page: > $tpl->assign('Content', $tpl->fetch('viewcomments.tpl')); > > ----- Original Message ----- > From: Andrei Zmievski <andrei@ispi.net> > To: "Brian E. Lozier" <brian@massassi.net> > Date: 12/28/01 1:06:29 PM I see. Your best bet then would be to use the fetched contents of inner template as the $cache_id. Alternatively, you can use $RESOURCE_URI or some other cache id on fetch() call and don't use it on display() since the main template is so simple. -Andrei * Proximity bug: when the program crashes in front of important visitors. *

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