目錄搜索
Clustercluster addslots(集群 槽位)cluster count failure reports(集群計數失敗報告)cluster countkeysinslotcluster delslotscluster failovercluster forgetcluster getkeysinslotcluster infocluster keyslot(集群鍵槽)cluster meetcluster nodes(集群節點)cluster replicate(集群復制)cluster reset(集群重置)cluster saveconfigcluster set config epochcluster setslotcluster slavescluster slotsreadonlyreadwriteConnectionauthechopingquitselectswapdbGeogeoaddgeodistgeohashgeoposgeoradiusgeoradiusbymemberHasheshdelhexistshgethgetallhincrbyhincrbyfloathkeyshlenhmgethmsethscanhsethsetnxhstrlenhvalsHyperLogLogpfaddpfcountpfmergeKeysdeldumpexistsexpireexpireatkeysmigratemoveobjectpersistpexpirepexpireatpttlrandomkeyrenamerenamenxrestorescansorttouchttltypeunlinkwaitListsblpopbrpopbrpoplpushlindexlinsertllenlpoplpushlpushxlrangelremlsetltrimrpoprpoplpushrpushrpushxPub/SubpsubscribepublishpubsubpunsubscribesubscribeunsubscribeScriptingevalevalshascript debugscript existsscript flushscript killscript loadServerbgrewriteaofbgsaveclient getnameclient killclient listclient pauseclient replyclient setnamecommandcommand countcommand getkeyscommand infoconfig getconfig resetstatconfig rewriteconfig setdbsizedebug objectdebug segfaultflushallflushdbinfolastsavemonitorrolesaveshutdownslaveofslowlogtimeSetssaddscardsdiffsdiffstoresintersinterstoresismembersmemberssmovespopsrandmembersremsscansunionsunionstoreSorted SetszaddzcardzcountzincrbyzinterstorezlexcountzrangezrangebylexzrangebyscorezrankzremzremrangebylexzremrangebyrankzremrangebyscorezrevrangezrevrangebylexzrevrangebyscorezrevrankzscanzscorezunionstoreStringsappendbitcountbitfieldbitopbitposdecrdecrbygetgetbitgetrangegetsetincrincrbyincrbyfloatmgetmsetmsetnxpsetexsetsetbitsetexsetnxsetrangestrlenTransactionsdiscardexecmultiunwatchwatch
文字

MSET key value [key value ...]

自1.0.1起可用。

時間復雜度: O(N)其中N是要設置的鍵的數量。

將給定的鍵設置為它們各自的值。與常規 SET 一樣,MSET 用新值替換現有值。如果您不想覆蓋現有值,請參閱 MSETNX。

MSET 是原子的,所以所有給定的鍵都被設置一次。客戶不可能看到某些密鑰已更新,而其他密鑰未更改。

返回值

簡單的字符串回復:總是OK因為 MSET 不能失敗。

例子

redis>  MSET key1 "Hello" key2 "World" "OK" redis>  GET key1 "Hello" redis>  GET key2 "World"

上一篇:下一篇:
澳洲幸运8在哪里开奖