Re: [SMARTY] caching questions
| From: | Daniel Cummings | Date: | Thu, 04 Mar 2004 18:55:51 +0000 |
| Subject: | Re: [SMARTY] caching questions | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-11061@lists.php.net to get a copy of this message | ||
Hi Bill,
Here's a wiki page with some relevant information. I don't think it answers
your exact question, but you can help everyone when you find the answer by
editing this wiki page. Just scroll to the bottom and click edit and add
what you learn to a new section on caching.
http://smarty.incutio.com/?page=CacheAndCompile
good luck!
dan
On 3/4/04 1:45 PM, "Bill Comisky" <bcomisky@pobox.com> wrote:
>
> I'm new to caching and still am a little muddled after reading the
> documentation.
>
> - Does it matter if I set
> $smarty->caching=true;
> or
> $smarty->caching=2;
>
> if I am only going to call $smarty->display() once on one template for
> this instantiation of $smarty?
>
> - If I have a static header and footer, but dynamic content in the middle,
> which of the following is appopriate:
>
>
> // this:
> $smarty->caching = 2;
>
> $smarty->lifetime = -1;
> $smarty->display('static_header.tpl');
>
> $smarty->lifetime = 0;
> $smarty->display('dynamic.tpl');
>
> $smarty->lifetime = -1;
> $smarty->display('static_footer.tpl');
>
>
> // or this:
> $smarty->caching = true;
> $smarty->lifetime = -1;
>
> $smarty->display('static_header.tpl');
>
> $smarty->caching = false;
> $smarty->display('dynamic.tpl');
>
> $smarty->caching = true;
> $smarty->display('static_footer.tpl');
>
> // or maybe have two instantiations, $smarty_caching and
> // $smarty_nocaching?
>
> // or some other way?
>
> Thanks for any help,
> bill