Redis常用用法

1. Redis客户端常用操作

启动命令行客户端

./redis-cli -h 127.0.0.1 -p 6379

输入密码(如果有的话)

auth <your-password>

设置一个key-value对

set hello world

获取一个key对应的value

get hello
> world

查看一个key的类型

type <your-key>

 对应keylist类型的get命令

getkeylist <your-key>

 对应hash类型的get命令

hget <key> <field>
hgetall <key>

2. Redis服务端搭建

TODO

3. Redis常用编程接口

https://github.com/redis/hiredis

4. 实现原理

TODO

5. 参考

http://www.redis.cn

https://www.runoob.com/redis/redis-tutorial.html

http://redisdoc.com

posted @ 2020-11-06 15:43  不写诗的诗人小安  阅读(75)  评论(0编辑  收藏  举报