redis 备忘

1.安装 及 资料

安装:
https://redis.io/download

# ubuntu 下直接装
sudo apt-get install redis-server 

playgroud:
http://try.redis.io/

中文资料:
官方文档的github:
https://github.com/antirez/redis-doc/tree/master/topics
Redis 设计与实现(第一版)(包括数据持久化):
https://redisbook.readthedocs.io/en/latest/index.html
入门 + 快速查询:
http://www.runoob.com/redis/redis-data-types.html
redis的适用场景:
https://www.jianshu.com/p/9cecff6042de

2.查看所有

# 查看 info
info
# info 中列出的每一项都可以 单独查询
info server
info clients

# 所有数据结构
keys *

# 所有channel
pubsub channels

# 切换数据库 0-15 ,默认为 0
select 1

3.数据结构

官方的说明(包括bitmap和阻塞list)https://redis.io/topics/data-types-intro

#list
lrange xxx 0 -1

#set
smembers xxx

#sort-set
zrange xxx 0 -1

#hash
hgetall xxx

4.sub pub

sub pattern 参考:
https://redisbook.readthedocs.io/en/latest/feature/pubsub.html
http://www.runoob.com/redis/redis-pub-sub.html

5.事务 和 watch

https://www.jianshu.com/p/361cb9cd13d5

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值