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; }
相关文章推荐
- memcache统计同一数据搜索次数,设置缓存
- 沙盒路径下存储和读取数据 缓存文件、偏好设置文件、plist文件
- php使用memcache处理缓存数据
- 微信小程序缓存,根据不同的id来进行设置和读取缓存
- Memcache,Redis,MongoDB(数据缓存系统)方案对比与分析
- PHP应用系列之三:用Memcache守护程序把数据缓存到内存中
- socket C/C++编程(6)server之accept()函数创建新socket以单独读取缓存区某个client的连接信息(客户端的IP和端口,但是,不包括client端键入的数据)
- 用Memcache守护程序把数据缓存到内存七(完)
- redis 一二事 - 设置过期时间,以文件夹形式展示key显示缓存数据
- 新浪云计算数据缓存性能测试(文件、KVDB、Memcache)
- Memcache,Redis,MongoDB(数据缓存系统)方案对比与分析
- 关于使用PyTorch设置多线程(threads)进行数据读取而导致GPU显存始终不释放的问题
- Android 使用RxJava+Retrofit +Realm 组合加载数据 <读取缓存 显示 请求网络数据 缓存最新数据 更新界面>(一)
- 数据字典的缓存刷新与读取的几种方式
- Memcache,Redis,MongoDB(数据缓存系统)方案对比与分析
- 分布式缓存系统Memcached(十)——状态机之网络数据读取与解析
- OKhttp2.6强制请求缓存,通过反射自由读取缓存数据
- 关于android手机设置项和数据缓存的一点经验
- 读取网络数据缓存在本地 流程图
- 数据读取/写入——线型缓存区