pexpire

PEXPIRE

PEXPIRE key milliseconds

This command works exactly like EXPIRE but the time to live of the key is specified in milliseconds instead of seconds.

Return value

Integer reply, specifically:

  • 1 if the timeout was set.
  • 0 if key does not exist or the timeout could not be set.

Examples

redis> SET mykey "Hello" "OK" redis> PEXPIRE mykey 1500 (integer) 1 redis> TTL mykey (integer) 1 redis> PTTL mykey (integer) 1496

© 2009–2017 Salvatore Sanfilippo
Licensed under the Creative Commons Attribution-ShareAlike License 4.0.
https://redis.io/commands/pexpire

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部