Redis 3 所有命令

來源:互聯網
上載者:User
Redis 3 所有命令

註:本文參考Redis中文網,內容更新。redis.cn即Redis中文網中的命令列表為Redis 2.8版本的,本文為最新Redis 3.0版本的全部命令(其實也就比2.8多出2個命令:CLIENT REPLY和SCRIPT DEBUG),點擊命令可查看詳情,Redis中文網中有的命令,詳情會轉到redis.cn對應頁面,否則轉至官網(redis.io)。命令一共196個(如果我沒有數錯的話)。 APPEND key value追加一個值到key上 AUTH password驗證伺服器命令 BGREWRITEAOF 非同步重寫追加檔案命令 BGSAVE 非同步儲存資料集到磁碟上 BITCOUNT key [start end]統計字串指定起始位置的位元組數 BITOP operation destkey key [key ...]Perform bitwise operations between strings BITPOS key bit [start] [end]Find first bit set or clear in a string BLPOP key [key ...] timeout刪除,並獲得該列表中的第一元素,或阻塞,直到有一個可用 BRPOP key [key ...] timeout刪除,並獲得該列表中的最後一個元素,或阻塞,直到有一個可用 BRPOPLPUSH source destination timeout彈出一個列表的值,將它推到另一個列表,並返回它;或阻塞,直到有一個可用 CLIENT KILL [ip:port] [ID client-id] [TYPE normal|slave|pubsub] [ADDR ip:port] [SKIPME yes/no]關閉用戶端串連 CLIENT LIST 獲得用戶端串連列表 CLIENT GETNAME 獲得當前串連名稱 CLIENT PAUSE timeout暫停處理用戶端命令 CLIENT REPLY ON|OFF|SKIPInstruct the server whether to reply to commands CLIENT SETNAME connection-name設定當前串連的名字 CLUSTER ADDSLOTS slot [slot ...]Assign new hash slots to receiving node CLUSTER COUNT-FAILURE-REPORTS node-idReturn the number of failure reports active for a given node CLUSTER COUNTKEYSINSLOT slotReturn the number of local keys in the specified hash slot CLUSTER DELSLOTS slot [slot ...]Set hash slots as unbound in receiving node CLUSTER FAILOVER [FORCE|TAKEOVER]Forces a slave to perform a manual failover of its master. CLUSTER FORGET node-idRemove a node from the nodes table CLUSTER GETKEYSINSLOT slot countReturn local key names in the specified hash slot CLUSTER INFO Provides info about Redis Cluster node state CLUSTER KEYSLOT keyReturns the hash slot of the specified key CLUSTER MEET ip portForce a node cluster to handshake with another node CLUSTER NODES Get Cluster config for the node CLUSTER REPLICATE node-idReconfigure a node as a slave of the specified master node CLUSTER RESET [HARD|SOFT]Reset a Redis Cluster node CLUSTER SAVECONFIG Forces the node to save cluster state on disk CLUSTER SET-CONFIG-EPOCH config-epochSet the configuration epoch in a new node CLUSTER SETSLOT slot IMPORTING|MIGRATING|STABLE|NODE [node-id]Bind an hash slot to a specific node CLUSTER SLAVES node-idList slave nodes of the specified master node CLUSTER SLOTS Get array of Cluster slot to node mappings COMMAND Get array of Redis command details COMMAND COUNT Get total number of Redis commands COMMAND GETKEYS Extract keys given a full Redis command COMMAND INFO command-name [command-name ...]Get array of specific Redis command details CONFIG GET parameter擷取配置參數的值 CONFIG REWRITE 從寫記憶體中的設定檔 CONFIG SET parameter value設定設定檔 CONFIG RESETSTAT 複位再分配使用info命令報告的統計 DBSIZE 返回當前資料庫裡面的keys數量 DEBUG OBJECT key擷取一個key的debug資訊 DEBUG SEGFAULT 使伺服器崩潰命令 DECR key整數原子減1 DECRBY key decrement原子減指定的整數 DEL key [key ...]刪除一個key DISCARD 丟棄所有 MULTI 之後發的命令 DUMP key匯出key的值 ECHO message回顯輸入的字串 EVAL script numkeys key [key ...] arg [arg ...]在伺服器端執行 LUA 指令碼 EVALSHA sha1 numkeys key [key ...] arg [arg ...]在伺服器端執行 LUA 指令碼 EXEC 執行所有 MULTI 之後發的命令 EXISTS key [key ...]查詢一個key是否存在

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.