1,php操作redis
function updateRedisCount($key, $count) {
$redis = new Redis();
$rcon = $redis->pconnect(REDIS_HOST, REDIS_PORT_3);
if ($rcon) {
if (!$redis->exists($key)) {
$redis->set($key, $count);
} else {
$redis->incrby($key, $count);
}
}
}
2,redis安全
http://www.cnblogs.com/langtianya/p/5189234.html
3,redis 删除命令
redis-cli keys "*" | xargs redis-cli del
4,*windows redis添加服务
redis-server --service-install redis.windows-service.conf --loglevel verbose
5,redis启动方式
http://www.tuicool.com/articles/aQbQ3u
6,redis连接
redis-cli -h 127.0.0.1 -p 6379
6,redis每次读取10000条数据
$match = $day.':usertab:*';
while ($arr = $redis->scan($it, $match, 10000)){
foreach($arr as $k=>$v){
//
}
}