Re: [SMARTY-GENERAL] Smarty 2.0.1 caching issue
| From: | Monte Ohrt | 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:-- Monte Ohrt <monte@ispi.net> Director of Technology, ispi Inc.If you have compile_check set to true, it should recompile & clear involved caches when a template gets updated. Jason Sweat wrote:__________________________________________________ Do You Yahoo!? Yahoo! Tax Center - online filing with TurboTax http://taxes.yahoo.com/ ------------------------------------------------------------------------I have an application that I recently upgraded to smarty 2.0.1 and I appear to have a cacheingissue.Pretty vanilla senario, cache, configs, templates,andtemplates_c are under the web page directory,pluginsis a soft link to a common directoy that has thebaseplugin'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 thecachedcontent as expected a) When I change the template, it takes a longtime(compiling + running queries?), then uses thecachedcontent generated with the prior template. b) When I change set the $my_clear_var true, itdoesprint the debug message, runs the expensive query,butit still uses the cached content c) When I delete everything in the cache directorybyhand gives me updated content I saw some other cache problems recently on thelist,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.