Redis Psetex 命令

Redis 教程 · 2019-03-07 06:58:32

Redis Psetex 命令以毫秒为单位设置 key 的生存时间。

语法

redis Psetex 命令基本语法如下:

redis 127.0.0.1:6379> PSETEX key1 EXPIRY_IN_MILLISECONDS value1 

可用版本

>= 2.6.0

返回值

设置成功时返回 OK 。

实例

redis 127.0.0.1:6379> PSETEX mykey 1000 "Hello"
OK
redis 127.0.0.1:6379> PTTL mykey
999
redis 127.0.0.1:6379> GET mykey
1) "Hello"

点击查看所有 Redis 教程 文章: https://www.codercto.com/courses/l/33.html

查看所有标签

The CS Detective: An Algorithmic Tale of Crime, Conspiracy, and

The CS Detective: An Algorithmic Tale of Crime, Conspiracy, and

Jeremy Kubica / No Starch Press / 2016-8-15 / USD 13.74

Meet Frank Runtime. Disgraced ex-detective. Hard-boiled private eye. Search expert.When a robbery hits police headquarters, it's up to Frank Runtime and his extensive search skills to catch the culpri......一起来看看 《The CS Detective: An Algorithmic Tale of Crime, Conspiracy, and 》 这本书的介绍吧!

在线进制转换器
在线进制转换器

各进制数互转换器

Markdown 在线编辑器
Markdown 在线编辑器

Markdown 在线编辑器

HSV CMYK 转换工具
HSV CMYK 转换工具

HSV CMYK互换工具