Redis PEXPIRE 命令

更新时间: 2019-07-07 15:54

Redis PEXPIRE 命令和 EXPIRE 命令的作用类似,但是它以毫秒为单位设置 key 的生存时间,而不像 EXPIRE 命令那样,以秒为单位。

语法

PEXPIRE key milliseconds

返回值

设置成功,返回 1

key 不存在或设置失败,返回 0

实例

127.0.0.1:6379> set domain 'www.codercto.com'
OK
127.0.0.1:6379> ttl domain
(integer) -1
127.0.0.1:6379> pexpire domain 100000
(integer) 1
127.0.0.1:6379> ttl domain
(integer) 96
127.0.0.1:6379> pttl domain
(integer) 92457

查看更多 Redis key 命令

Hello World

Hello World

Hannah Fry / W. W. Norton Company / 2018-9 / GBP 17.99

A look inside the algorithms that are shaping our lives and the dilemmas they bring with them. If you were accused of a crime, who would you rather decide your sentence—a mathematically consistent ......一起来看看 《Hello World》 这本书的介绍吧!

随机密码生成器

随机密码生成器

多种字符组合密码

XML 在线格式化

XML 在线格式化

在线 XML 格式化压缩工具

html转js在线工具

html转js在线工具

html转js在线工具