redis

来源:互联网 发布:用matlab解矩阵方程组 编辑:程序博客网 时间:2024/06/09 20:51

http://doc.redisfans.com/


redis-cli

exit

1.字符串

set 名 值

get 名


2.哈希/散列

hmset

hget  哈希名:号 名 

hgetall  哈希名:号

> hmset user:1000 username antirez birthyear 1977 verified 1OK> hget user:1000 username"antirez"> hget user:1000 birthyear"1977"> hgetall user:10001) "username"2) "antirez"3) "birthyear"4) "1977"5) "verified"6) "1"
3.队列

127.0.0.1:6379> lrange cjxlist 0 -1
1) "1"
2) "2"
3) "3"
4) "213"
127.0.0.1:6379> lset cjxlist  3 'asd'
OK
127.0.0.1:6379> lrange cjxlist 0 -1
1) "1"
2) "2"
3) "3"
4) "asd"

0 0
原创粉丝点击