标签:获取 rgs 解压 quit 内存 member space 缓存 结构
127.0.0.1:6379> set username admin OK 127.0.0.1:6379> get username "admin" 127.0.0.1:6379>
127.0.0.1:6379> set id 1 OK 127.0.0.1:6379> get id "1" 127.0.0.1:6379> incr id (integer) 2 127.0.0.1:6379> get id "2"
127.0.0.1:6379> set id 1 OK 127.0.0.1:6379> get id "1" 127.0.0.1:6379> incr id (integer) 2 127.0.0.1:6379> get id "2" 127.0.0.1:6379> decr id (integer) 1 127.0.0.1:6379>
127.0.0.1:6379> get id "1" 127.0.0.1:6379> incrby id 19 (integer) 20 127.0.0.1:6379> get id
127.0.0.1:6379> get id "20" 127.0.0.1:6379> decrby id 19 (integer) 1 127.0.0.1:6379> get id "1"
127.0.0.1:6379> keys * 1) "username" 2) "id"
127.0.0.1:6379> set user:id:1:username admin OK 127.0.0.1:6379> set user:id:1:password admin OK 127.0.0.1:6379> set user:id:1:phone 131xx1212 OK 127.0.0.1:6379> set user:id:1:email 3xx@qq.com OK 127.0.0.1:6379> set user:id:1:register_time 2019-01-02 OK 127.0.0.1:6379> set user:id:1:root 0 OK
127.0.0.1:6379> keys user:id:1*
1) "user:id:1:password"
2) "user:id:1:username"
127.0.0.1:6379> get user:id:1:username
"admin"
127.0.0.1:6379> hset user username admin (integer) 1 127.0.0.1:6379> hget user username "admin"
127.0.0.1:6379> hmset user password admin phone 13xxx email 3xx@qq.com OK 127.0.0.1:6379> hgetall user 1) "username" 2) "admin" 3) "password" 4) "admin" 5) "phone" 6) "13xxx 7) "email" 8) "3xx@qq.com"
127.0.0.1:6379> lpush link1 A (integer) 1 127.0.0.1:6379> lpush link1 B (integer) 2 127.0.0.1:6379> lpush link1 C (integer) 3 127.0.0.1:6379>
127.0.0.1:6379> lpush link1 A (integer) 1 127.0.0.1:6379> lpush link1 B (integer) 2 127.0.0.1:6379> lpush link1 C (integer) 3 127.0.0.1:6379> keys link1
127.0.0.1:6379> lrange link1 0 -1 1) "C" 2) "B" 3) "A" 127.0.0.1:6379> loop link1 (error) ERR unknown command `loop`, with args beginning with: `link1`, 127.0.0.1:6379> lpop link1 "C" 127.0.0.1:6379> lrange link1 0 -1 1) "B" 2) "A" 127.0.0.1:6379>
127.0.0.1:6379> lrange link1 0 -1
1) "B"
2) "A"
127.0.0.1:6379> rpop link1
"A"
127.0.0.1:6379> lrange link1 0 -1
1) "B"
127.0.0.1:6379> sadd set1 1 (integer) 1 127.0.0.1:6379> sadd set1 2 (integer) 1 127.0.0.1:6379> sadd set1 3 (integer) 1
127.0.0.1:6379> smembers set1
1) "1"
2) "2"
3) "3"
127.0.0.1:6379> smembers set1 1) "1" 2) "2" 3) "3" 127.0.0.1:6379> srem set1 2 (integer) 1 127.0.0.1:6379> smembers set1 1) "1" 2) "3" 127.0.0.1:6379>
127.0.0.1:6379> spop set1 "3" 127.0.0.1:6379> spop set1 "1"
127.0.0.1:6379> zadd class:phpRank 5 mark (integer) 1
127.0.0.1:6379> zrange class:phpRank 0 -1
1) "mark"
127.0.0.1:6379> zrange class:phpRank 0 -1 withscores 1) "mark" 2) "5"
标签:获取 rgs 解压 quit 内存 member space 缓存 结构
原文地址:https://www.cnblogs.com/fatRabbit-/p/10633996.html