标签:
$cache=S(‘newskey‘); if(!$cache){ $cache=M(‘news‘)->cache(true,60,‘newskey‘)->where(‘state=1‘)->order(‘publishtime desc‘)->limit(5)->select(); } $this->assign(‘recentnews‘,$cache);
thinkphp缓存的简单使用
原文地址:http://www.cnblogs.com/panqingqiang/p/4308545.html