Re: Another caching Question
| From: | Bram van Leur | Date: | Wed, 15 May 2002 08:38:47 +0000 |
| Subject: | Re: Another caching Question | ||
| References: | 1 | Groups: | php.smarty.general php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-4196@lists.php.net to get a copy of this message | ||
Smarty cannot cache a small part of your template output, it just caches the entire generated (html) file.
You should find some way to cache it manually, like writing the dropdown array to a file and update the file using a cronjob or after an expiration date when reading it.
The only way Smarty could help is using a sub-template, which you include in your main template. This sub-template can have a different cache lifetime than your main template (which may not be cached at all).
Ray wrote:
Ive been reading and reading on caching and from what i see it seems rather difficult to accomplish selective caching inside a template. All I would like to accomplish in my current page is to cache 2 items which are dropdowns pulled from the. It is a rather Large amount of data when hit many times in a row. I dont really want to pull it from another template unless that is the only way it will function. Anyone having ways they do this type of stuff within the PHP code that displays the page, or how you currently achieve this method of caching please Post me a reply. Thanks-- Bram v. Leur The Netherlands Proud to PHP!