houdj

thinkphp+memcache缓存例子

public function dailyRelays() {
$history = I(\'post.history\');
$da = new \Home\Model\DailyrelayModel();
if (empty($history) || ($history == 0)) {//今日转发列表
$this->question = $da->getList(session(\'memberid\'),0);
} else if ($history == 1) {//历史转发列表
$cache_name=md5(session(\'memberid\'));
if(S($cache_name)){
G(\'begin\');
$ssss = S($cache_name);
$this->question = $ssss;
G(\'end\');
echo G(\'begin\',\'end\').\'s\';

}else{
G(\'begin\');
$ssss = $da->getList(session(\'memberid\'),1);
S($cache_name,$ssss,5);
$this->question = $ssss;
G(\'end\');
echo G(\'begin\',\'end\').\'s\';
}
}
$this->memberid = session(\'memberid\');

$this->display();
}

分类:

技术点:

相关文章:

  • 2021-11-12
  • 2021-06-29
  • 2021-11-15
  • 2021-10-05
  • 2021-12-10
  • 2021-10-03
  • 2022-01-13
  • 2021-11-23
猜你喜欢
  • 2022-12-23
  • 2021-10-03
  • 2021-10-19
  • 2021-11-06
  • 2022-01-11
  • 2022-12-23
相关资源
相似解决方案