Page 1 of 1

smarty3 caching

Posted: Sun Jan 23, 2011 6:24 am
by philas
i'm use smarty 3 and write

Code: Select all

$smarty = new Smarty();
$smarty->config_dir='./smarty/sconfigs/';
$smarty->template_dir='./templates/new/';
$smarty->compile_dir='./smarty/stemplates_c/';
$smarty->cache_dir='./smarty/scache/';

if(!$smarty->isCached('index.tpl','default')) {
   $smarty->assign("u",refresh_user_info(),true);    
}        
$smarty->display('index.tpl','default');  
but {$u} is missing when i add if($smarty->isCached

help please!

Re: smarty3 caching

Posted: Sun Jan 23, 2011 4:17 pm
by Peec
You would properly need to delete the cached version of the tpl file in /smarty/scache/

It might already have been cached, and this is why you will not get {$u} , because it's already cached and it just jumps to display.

Re: smarty3 caching

Posted: Sun Jan 23, 2011 10:39 pm
by philas
i tried to delete all smarty cache before test. did not help :(