Re: [SMARTY-GENERAL] Smarty 2.0.1 caching issue

From: Date: Fri, 05 Apr 2002 20:05:51 +0000
Subject: Re: [SMARTY-GENERAL] Smarty 2.0.1 caching issue
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-3525@lists.php.net to get a copy of this message
Can you repeat this phenomena with a bare-bones test case? Jason Sweat wrote:
This problem has to do with the $smarty->fetch() method. The attached bitmap ( sorry list members, it gets filtered ) shows the fetch result pulls back cached content, and the display uses the non-cached content. The general structure of my script earlier did depict the use of both fetch & display, the only difference was I did a display immediatly after the first fetch to duplicate the content. Any idea's what is going on here? Jason --- Monte Ohrt <monte@ispi.net> wrote:
If you have compile_check set to true, it should recompile & clear involved caches when a template gets updated. Jason Sweat wrote:
I have an application that I recently upgraded to smarty 2.0.1 and I appear to have a cacheing
issue.
Pretty vanilla senario, cache, configs, templates,
and
templates_c are under the web page directory,
plugins
is a soft link to a common directoy that has the
base
plugin's + trimwhitespace and showinfoheader. script looks something like like $t->caching=true; $t->cache_lifetime=$two_days; if ($my_clear_var) { $t->clear_cache($tpl); print "<!-- I cleared the cache for $tpl -->\n"; } if (!$t->is_cached($tpl)) { // do expensive query $t->assign(...); } $content = $t->fetch($tpl); //disable caching for the main page $t->caching = false; $t->cache_lifetime = 0; $t->assign('CONTENT', $content); $t->display($page_tpl); I use this under a couple of senarios a) When I hit the page normally, it uses the
cached
content as expected a) When I change the template, it takes a long
time
(compiling + running queries?), then uses the
cached
content generated with the prior template. b) When I change set the $my_clear_var true, it
does
print the debug message, runs the expensive query,
but
it still uses the cached content c) When I delete everything in the cache directory
by
hand gives me updated content I saw some other cache problems recently on the
list,
but they did not appear to be related. __________________________________________________ Do You Yahoo!? Yahoo! Tax Center - online filing with TurboTax http://taxes.yahoo.com/
-- Monte Ohrt <monte@ispi.net> Director of Technology, ispi Inc.
__________________________________________________ Do You Yahoo!? Yahoo! Tax Center - online filing with TurboTax http://taxes.yahoo.com/ ------------------------------------------------------------------------
-- Monte Ohrt <monte@ispi.net> Director of Technology, ispi Inc.

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