PSETEX

PSETEX

PSETEX key milliseconds value
Available since
2.6.0
Time complexity
O(1)
ACL categories
@write, @string, @slow

PSETEX works exactly like SETEX with the sole difference that the expire time is specified in milliseconds instead of seconds.

Examples #

PSETEX mykey 1000 "Hello"
PTTL mykey
GET mykey

Redict logo courtesy of @janWilejan, CC-BY-SA-4.0. Download SVG ⤑

Portions of this website courtesy of Salvatore Sanfilippo, CC-BY-SA-4.0.