English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The Redis Psetex command sets the survival time of the key in milliseconds.
The basic syntax of the redis Psetex command is as follows:
redis 127.0.0.1:6379> PSETEX key1 EXPIRY_IN_MILLISECONDS value1
>= 2.6.0
Returns OK when the setting is successful.
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"