RE: [SMARTY] Caching problem

From: Date: Thu, 27 Jun 2002 13:12:27 +0000
Subject: RE: [SMARTY] Caching problem
References: 1 2  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-5063@lists.php.net to get a copy of this message
> What's the value of $cache_id? Have you checked that it doesn't contain > any "weird things (tm)"? Yeah, I've tried urlencode()ing and md5()ing to make sure that nothing strange happens. I have a feeling I've just missed something simple, but I can't figure out what it is :( /claus > -----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

« previous php.smarty.general (#5063) next »