SETSet a key's string value with optional TTL and existence conditions.
| Syntax | SET key value [EX seconds|PX milliseconds] [NX|XX] |
| Group | string |
| Arity | -3 |
| Since | 1.0.0 |
| Flags | write |
| Complexity | O(1) |
| Redis compatibility | differs: only NX / XX / EX / PX are parsed — KEEPTTL, EXAT, PXAT, GET and the IFEQ family are a syntax error; a repeated expire option is silently accepted last-one-wins instead of erroring |