$mem=new \Memcache();
$mem->connect("localhost",11211);
$rekey = "abc";
$re_key = md5($rekey);
$re_exp = $mem->get($re_key);
if($re_exp===false){
$re_exp = $re_mark->join("te_recommend r on te_mark.tid=r.tid")->field('recom_id,recom_name')->select();
$mem->set($re_key,$re_exp,0,24*60*60);
}
$this->assign("re_exp",$re_exp);
在ThinkPHP3.2中使用memcache
最新推荐文章于 2021-03-29 02:09:37 发布