smarty缓存时间差
比如如下:
if(!$smarty->is_cached('cate.htm')) {
//进行数据库的链接查询等操作
//统计这一次访问所用的时间是多少秒
$name = "分类";
$smarty->assign("name",$name);
$smarty->display("cate.htm");
}
else{
//统计这一次访问所用的时间是多少秒
//.........
$smarty->display("cate.htm");
}
或是简单的说,我是想统计在缓存期内,第一次访问的时间与第二次访问的时间差是多少?
对于这个如何去实现?
第一次访问时,没有缓存文件的存在
第二次访问时,有缓存文件了,并在缓存期内的
我想比较两者的时间差是多少?