2014-10-08 68 views
0

我想关闭smarty中的高速缓存功能。我曾尝试使用以下代码如何关闭smarty中的高速缓存功能

$smarty->caching = true; 
$smarty->cache_lifetime = 120; 

但上述代码不起作用。

我该如何关闭缓存。

在此先感谢!

+0

在Smarty的3,$ smarty-> setCaching(Smarty的:: CACHING_OFF); – sofl 2014-10-08 14:24:04

回答

0

如果你想关闭它,你需要设置:

$smart->caching = Smarty::CACHING_OFF; 

,而不是

$smarty->caching = true; 

,你在你的问题表明