Redis学习笔记01__数据类型

细枝末节

1. Redis是单线程的

数据类型

1. string
2. set
3. list
4. hash
5. zset

指令

/* 查看当前库所有键 */
ksys *

/* 判断某个键是否存在 */
exists <key>

/* 判断某个键的类型 */
type <key>

/* 删除某个键 */
del <key>

/* 为键值设置过期时间 */
expire <key> <seconds>

/* 查看键的过期时间,-1表示永不过时,-2表示已过时 */
ttl <key>

/* 查看当前数据库key的数量 */
dbsize

/* 清空当前库 */
Flushdb

/* 清空全部库 */
Flushall

评论

暂无评论