Caching problem
| From: | Claus Rasmussen | Date: | Thu, 27 Jun 2002 06:15:21 +0000 |
| Subject: | Caching problem | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-5053@lists.php.net to get a copy of this message | ||
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