EXPIRESet a key's TTL in seconds (non-positive TTL deletes the key).
| 语法 | EXPIRE key seconds |
| 分组 | generic |
| 参数个数 | 3 |
| 起始版本 | 1.0.0 |
| 标志 | write |
| 复杂度 | O(1) |
| Redis 兼容性 | differs: the NX / XX / GT / LT condition flags are not parsed — arity is fixed at 3, so EXPIRE key seconds NX is a wrong-arity error |