EXPIRETIME
Note
Official reference: EXPIRETIME.
Read the key expiration timestamp in seconds.
Syntax
EXPIRETIME key
-1 means no expiration; -2 means the key is missing.
Results
| Return | Rows | Content |
|---|---|---|
| ResultSet | 1 | RESULT field, LONG type |
Example
SET demo:message hello EX 60
EXPIRETIME demo:message