1

我在加载模板文件之前为 Smarty 变量赋值。有没有办法告诉 Smarty 永远不要缓存特定变量的值?在某些情况下,例如在搜索结果中,我不希望 Smarty 缓存这些值。

4

1 回答 1

2

Smarty3:{$myvar nocache} 或用 {nocache}{/nocache} 标签包围块。

http://www.smarty.net/docs/en/caching.tpl

于 2011-12-08T15:27:42.763 回答