Re: [SMARTY] Caching problem
| From: | Robert Amos | Date: | Thu, 27 Jun 2002 06:23:08 +0000 |
| Subject: | Re: [SMARTY] Caching problem | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-5054@lists.php.net to get a copy of this message | ||
have you tried using $smarty->is_cached() ?
-bok
On 27/6/02 4:15 PM, Claus Rasmussen banged a keyboard and produced the
following weird but readable email:
> Hi folks,
>
> I'm trying to cache my search results based on the query string that
> dictates the query, but Smarty only caches one file regardless of which
> cache_id I provide it. To wit, I do something like this:
> $template = "my_template.tpl";
> $cache_id = $_ENV['QUERY_STRING'];
>
> $smarty = new Smarty;
> $smarty->caching = 1;
>
> if(!is_cached($template, $cache_id)) {
> ...blah...
> }
>
> $smarty->display($template, $cache_id);
>
> Now, the page gets cached, but when I call it up again, my if() evaluates to
> true (can't find a match in cache), but it does display() the cached version
> because it shows the same cached version even when I change the query
> string.
> Are there any common pitfalls that I've missed, or am I just too tired?
>
> Best,
> Claus
>
>