Linux 登录 redis
redis-cli -p 6379 -a password
查询是否存在 key 值
exists stringKey || exists hashKey
String 类型
设置 set stringKey stringValue
获取 get stringKey
获取多个 mget stringKey-1 stringKey-2
hash 类型
设置 hmset hashKey hashValueKey hashValue
赋值 hset hashKey hashValueKey hashValue
获取 hgetall hashKey || hkeys hashKey || hvals hashKey
list 类型
设置 lpush listName listValue
获取 lindex listName [list-index]