MSET

Stores several string key-value pairs in one command.

Strings · Example verified

Syntax covered here

MSET key value [key value ...]

MGET reads back the supplied values in the requested key order.

Tested example & replies

Requests below run in order against an empty database. Each connection authenticates with the fixture password first. Quoted values are strings; null is a nil reply; arrays preserve RESP order.

# connection: default
> MSET one 1 two 2
"OK"
# connection: default
> MGET one two
["1","2"]