Latest web development tutorials

Redis Mset command

Redis string (string)

Redis Mset command for simultaneously providing one or more key-value pairs.

grammar

redis Mset basic command syntax is as follows:

redis 127.0.0.1:6379> MSET key1 value1 key2 value2 .. keyN valueN 

Available versions

> = 1.0.1

return value

Always returns OK.

Examples

redis 127.0.0.1:6379> MSET key1 "Hello" key2 "World"
OK
redis 127.0.0.1:6379> GET key1
"Hello"
redis 127.0.0.1:6379> GET key2
1) "World"

Redis string (string)