liukaida 发表于 2018-11-2 09:52:23

redis基础操作

127.0.0.1:6379> LPUSH apple www.apple.com  
(integer) 2
  
127.0.0.1:6379> LPUSH apple www.baidu.com
  
(integer) 3
  
127.0.0.1:6379> LPUSH apple www.baidu.com
  
(integer) 4
  
127.0.0.1:6379> LPUSH apple www.baidu.com
  
(integer) 5
  
127.0.0.1:6379> LRANGE apple 0 10
  
1) "www.baidu.com"
  
2) "www.baidu.com"
  
3) "www.baidu.com"
  
4) "www.apple.com"
  
5) "www.apple.com"
  
127.0.0.1:6379> BLPOP apple 0
  
1) "apple"
  
2) "www.baidu.com"
  
127.0.0.1:6379> BLPOP apple 0
  
1) "apple"
  
2) "www.baidu.com"
  
127.0.0.1:6379> BLPOP apple 0
  
1) "apple"
  
2) "www.baidu.com"
  
127.0.0.1:6379> BLPOP apple 0
  
1) "apple"
  
2) "www.apple.com"
  
127.0.0.1:6379> BLPOP apple 0
  
1) "apple"
  
2) "www.apple.com"
  
127.0.0.1:6379> LRANGE apple 0 10
  
(empty list or set)


页: [1]
查看完整版本: redis基础操作