Re: [SMARTY-GENERAL] Smarty 2.0.1 caching issue
| From: | Monte Ohrt | Date: | Fri, 05 Apr 2002 18:35:12 +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-3523@lists.php.net to get a copy of this message | ||
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.