English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

comando Redis Psetex

stringa(string) Redis

Il comando Redis Psetex imposta il tempo di vita del key in millisecondi.

sintassi

sintassi di comando base per redis Psetex:

redis 127.0.0.1:6379> PSETEX key1 EXPIRY_IN_MILLISECONDS value1

versioni disponibili

>= 2.6.0

valore di ritorno

ritorna OK quando impostato con successo .

esempio online

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"

stringa(string) Redis