{nocache}
{nocache}用于禁用模板部分的缓存。每个{nocache}必须与匹配的{/nocache}配对。
注意
确保在非缓存部分使用的任何变量也在页面从缓存加载时从 PHP 分配。
今天的日期是
{nocache}
{$smarty.now|date_format}
{/nocache}
上述代码将在缓存页面上输出当前日期。
请参阅caching section获取更多信息。
{nocache}用于禁用模板部分的缓存。每个{nocache}必须与匹配的{/nocache}配对。
注意
确保在非缓存部分使用的任何变量也在页面从缓存加载时从 PHP 分配。
今天的日期是
{nocache}
{$smarty.now|date_format}
{/nocache}
上述代码将在缓存页面上输出当前日期。
请参阅caching section获取更多信息。