如何在smarty中关闭缓存功能

时间:2014-10-08 12:29:32

标签: caching smarty

我想在smarty中关闭缓存功能。我尝试使用以下代码

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

但上面的代码不起作用。

如何关闭缓存。

先谢谢!!

1 个答案:

答案 0 :(得分:0)

如果要将其关闭,则需要设置:

 $smart->caching = Smarty::CACHING_OFF;

而不是

 $smarty->caching = true;
你在问题中的表现

相关问题