Skip to main content

PSETEX

Syntax

PSETEX key milliseconds value

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

dragonfly> PSETEX mykey 1000 "Hello"
"OK"
dragonfly> PTTL mykey
(integer) 1000
dragonfly> GET mykey
"Hello"