Redis PEXPIRE 命令
Redis PEXPIRE 命令和 EXPIRE 命令的作用类似,但是它以毫秒为单位设置 key 的生存时间,而不像 EXPIRE 命令那样,以秒为单位。
语法
redis PEXPIRE 命令基本语法如下:
PEXPIRE key milliseconds
可用版本
>= 2.6.0
返回值
设置成功,返回 1
key 不存在或设置失败,返回 0
实例
首先创建一个 key 并赋值:
redis> SET mykey "Hello" "OK" redis> PEXPIRE mykey 1500 (integer) 1 redis> TTL mykey (integer) 1 redis> PTTL mykey (integer) 1498 redis>
点击查看所有 Redis 教程 文章: https://codercto.com/courses/l/33.html
标签: pexpire
Uberland
Alex Rosenblat / University of California Press / 2018-11-19 / GBP 21.00
Silicon Valley technology is transforming the way we work, and Uber is leading the charge. An American startup that promised to deliver entrepreneurship for the masses through its technology, Uber ins......一起来看看 《Uberland》 这本书的介绍吧!