block_cacheless.php
<?php
function smarty_block_cacheless($args,$content){
return $content;
}
?>
cache.tpl
已经有缓存:{$smarty.now}
<br>
{cacheless}
没有缓存的:{$smarty.now}
{/cacheless}
testCacheLsee.php
<?php
include("Smarty.class.php");
$tpl = new Smarty;
$tpl->caching=2;
$tpl->cache_lifetime = 6;
$tpl->display("cache.tpl");
?>