redis-API-全局命令
2018-12-11 本文已影响0人
PHP的艺术编程

单线程架构
-
纯内存
-
非阻塞i/o
-
单线程避免了线程切换和竟态产生的消耗
-
概要: 使用多路复用技术
全局命令
-
查看所有键
- key *
- 算法法度o(n)
-
键总数
- dbsize
- 算法复杂度O(1)
-
检查键是否存在
- exists key
-
删除键
- del key
-
键过期时间
- expire key seconds
- ttl
- 大于等于0的整数:键剩余要的过期时间
- -1:键没有设置过期时间
- -2:键不存在