? This document uses PHP Chinese website manual Release
MGET key [key ...]
自1.0.0起可用。
時間復雜度: O(N)其中N是要檢索的鍵的數(shù)量。
返回所有指定鍵的值。對于不包含字符串值或不存在的每個鍵,nil都會返回特殊值。因此,操作永遠不會失敗。
nil
數(shù)組回復:指定鍵值的列表。
redis> SET key1 "Hello" "OK" redis> SET key2 "World" "OK" redis> MGET key1 key2 nonexisting 1) "Hello" 2) "World" 3) (nil)
"OK"
1) "Hello" 2) "World" 3) (nil)