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://www.codercto.com/courses/l/33.html
标签: pexpire
The Ruby Programming Language
David Flanagan、Yukihiro Matsumoto / O'Reilly Media, Inc. / 2008 / USD 39.99
Ruby has gained some attention through the popular Ruby on Rails web development framework, but the language alone is worthy of more consideration -- a lot more. This book offers a definition explanat......一起来看看 《The Ruby Programming Language》 这本书的介绍吧!