Re:Re:[BEGINNER] Question about caching
| From: | Andrei Zmievski | Date: | Fri, 28 Dec 2001 21:06:29 +0000 |
| Subject: | Re:Re:[BEGINNER] Question about caching | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-2417@lists.php.net to get a copy of this message | ||
On Fri, 28 Dec 2001, Brian E. Lozier wrote:
> >> The whole method seems to break as soon as you start using ->fetch(), though.
> >
> >What do you mean? Any short examples?
>
> I've posted 3 examples previously on this list. When I have an outer 'main.tpl'
> and then the content is
> handled by inner ->fetch() calls, the caching gets confused and simply doesn't work.
> It keeps returning the
> same content, no matter what 'cache_id' I pass.
>
> I think the problem lies in the fact that at the end of EVERY page, I've got
> $tpl->display('main.tpl') - so
> the thing always caches in the same place, no matter what. If I pass a $REQUEST_URI, it caches
> the outer
> template correctly, but not the inner template. If I pass a $REQUEST_URI to my
> ->fetch('index.tpl'), it
> seems to CACHE the content correctly (I can view it if I go to the right dir or use the display
> function on
> THAT template), but it doesn't get outputted when I do->display('main.tpl').
> That just displays whatever one
> got cached last time.
Hold on, how are your templates organized? You have a main template that
includes another template and you are calling display() on the main one.
Where does fetch() come in?
-Andrei
* Anything will fit if you push hard enough. *