SET
Set a key's string value with optional TTL and existence conditions.
SET key value [EX seconds|PX milliseconds] [NX|XX]
Complexity
O(1)
Complexity and compatibility are read out of kevy's implementation, not copied from Redis's reference. Several genuinely differ.
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
See also
APPENDDECRDECRBYGETGETDELGETSETINCRINCRBYINCRBYFLOATMGETMSETPSETEXSETEXSETNXSTRLEN