1.设置key值
set name zhangsan
删除key
del name

2. 判断key是否存在
exists a,返回1 说明存在; 0 表示不存在

3. 剩余过期时间 ttl(time to leave)

返回-1,说明没有过期时间
4. 设置key过期时间
expire a 20 过期时间设置为20秒

-2 说明不存在key了
5. type命令

代表key的类型为string
设置可以hash

类型hash是hash
6. randomkey 随机key,每次key都是随机的

7 rename重命名key

renamenx 如果已经存在key,在rename失败。
