1.S方法缓存设置
if(!$rows = S(‘indexBlog‘)){ //*$rows = S(‘indexBlog‘) $rows = D(‘blog‘)->select(); S(‘indexBlog‘,$rows,10); } $this->assign(‘rows‘,$rows); //$rows = S(‘indexBlog‘) $this->display();
2.静态缓存
3.局部缓存
时间: 2024-12-17 07:24:57
1.S方法缓存设置
if(!$rows = S(‘indexBlog‘)){ //*$rows = S(‘indexBlog‘) $rows = D(‘blog‘)->select(); S(‘indexBlog‘,$rows,10); } $this->assign(‘rows‘,$rows); //$rows = S(‘indexBlog‘) $this->display();
2.静态缓存
3.局部缓存