RE: [SMARTY] Caching problem
| From: | Alain Fontaine | Date: | Thu, 27 Jun 2002 12:57:07 +0000 |
| Subject: | RE: [SMARTY] Caching problem | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-5062@lists.php.net to get a copy of this message | ||
Hello,
What's the value of $cache_id? Have you checked that it doesn't contain any
"weird things (tm)"?
-----Message d'origine-----
De : Claus Rasmussen [mailto:claus@webclaus.com]
Envoyé : jeudi 27 juin 2002 08:15
À : smarty-general@lists.php.net
Objet : [SMARTY] Caching problem
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
--
Smarty General Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php