您的位置:首页 > 数据库 > Memcache

memcache 读取数据缓存设置

2012-02-06 11:21 393 查看
function getUserNoPassThreadsByFidAndUidAndIfCheck($fid, $uid, $ifCheck, $num = 5) {
if(!Perf::checkMemcache()) {
$threadsService = L::loadClass('Threads', 'forum'); /* @var $threadsService PW_Threads */
return $threadsService->getUserThreadsByFidAndUidAndIfCheckNoCache($fid, $uid, $ifCheck, $num);
}

$key = $this->_getKeyForUserNoPassThreads($fid, $uid);
$result = $this->_cacheService->get($key);

if ($result === false) {
$threadsService = L::loadClass('Threads', 'forum'); /* @var $threadsService PW_Threads */
$result = $threadsService->getUserThreadsByFidAndUidAndIfCheckNoCache($fid, $uid, $ifCheck, $num);
$this->_cacheService->set($key, $result);
}
return $result;
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐