Re: [SMARTY] Caching problem

From: Date: Thu, 27 Jun 2002 06:24:46 +0000
Subject: Re: [SMARTY] Caching problem
References: 1 2  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-5055@lists.php.net to get a copy of this message
> have you tried using $smarty->is_cached() ? Oops, typo. Yes, I use $smarty->is_cached(). /claus > 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 >> >> > > > -- > Smarty General Mailing List (http://smarty.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php

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