kevy4.0

SET

Set a key's string value with optional TTL and existence conditions.

SET key value [EX seconds|PX milliseconds] [NX|XX]
Group
String
Since
1.0.0
Arity
at least 3
Flags
write

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

← All commands