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 命令

Design for Hackers

Design for Hackers

David Kadavy / Wiley / 2011-10-18 / USD 39.99

Discover the techniques behind beautiful design?by deconstructing designs to understand them The term ?hacker? has been redefined to consist of anyone who has an insatiable curiosity as to how thin......一起来看看 《Design for Hackers》 这本书的介绍吧!

JS 压缩/解压工具

JS 压缩/解压工具

在线压缩/解压 JS 代码

JSON 在线解析

JSON 在线解析

在线 JSON 格式化工具

RGB CMYK 转换工具

RGB CMYK 转换工具

RGB CMYK 互转工具