更新时间:2022-02-21 GMT+08:00

Redis5.0命令

DCS Redis5.0基于开源5.0.9版本进行开发,兼容开源的协议和命令。

本章节主要介绍DCS Redis5.0命令的兼容性,包括支持命令列表,禁用命令列表。命令的具体详细语法,请前往Redis官方网站查看。

DCS Redis缓存实例支持Redis的绝大部分命令,具体支持的命令,请参考Redis5.0支持的命令,任何兼容Redis协议的客户端都可以访问DCS。

Redis5.0支持的命令

以下列出了Redis5.0实例支持的命令。

表1 Redis5.0 支持命令清单1

Key(键)

String(字符串)

Hash(哈希表)

List(列表)

Set(集合)

SortedSet(有序集合)

Server(服务器)

DEL

APPEND

HDEL

BLPOP

SADD

ZADD

FLUSHALL

DUMP

BITCOUNT

HEXISTS

BRPOP

SCARD

ZCARD

FLUSHDB

EXISTS

BITOP

HGET

BRPOPLRUSH

SDIFF

ZCOUNT

DBSIZE

EXPIRE

BITPOS

HGETALL

LINDEX

SDIFFSTORE

ZINCRBY

TIME

MOVE

DECR

HINCRBY

LINSERT

SINTER

ZRANGE

INFO

PERSISI

DECRBY

HINCRBYFLOAT

LLEN

SINTERSTORE

ZRANGEBYSCORE

KEYS

PTTL

GET

HKEYS

LPOP

SISMEMBER

ZRANK

CLIENT KILL

RANDOMKEY

GETRANGE

HMGET

LPUSHX

SMEMBERS

ZREMRANGEBYRANK

CLIENT LIST

RENAME

GETSET

HMSET

LRANGE

SMOVE

ZREMRANGEBYCORE

CLIENT GETNAME

RENAMENX

INCR

HSET

LREM

SPOP

ZREVRANGE

CLIENT SETNAME

RESTORE

INCRBY

HSETNX

LSET

SRANDMEMBER

ZREVRANGEBYSCORE

CONFIG GET

SORT

INCRBYFLOAT

HVALS

LTRIM

SREM

ZREVRANK

MONITOR

TTL

MGET

HSCAN

RPOP

SUNION

ZSCORE

SLOWLOG

TYPE

MSET

HSTRLEN

RPOPLPU

SUNIONSTORE

ZUNIONSTORE

ROLE

SCAN

MSETNX

-

RPOPLPUSH

SSCAN

ZINTERSTORE

SWAPDB

OBJIECT

PSETEX

-

RPUSH

SPOP

ZSCAN

MEMORY

-

SET

-

RPUSHX

-

ZRANGEBYLEX

-

-

SETBIT

-

-

-

ZLEXCOUNT

-

-

SETEX

-

-

-

ZPOPMIN

-

-

SETNX

-

-

-

ZPOPMAX

-

-

SETRANGE

-

-

-

-

-

-

STRLEN

-

-

-

-

-

-

BITFIELD

-

-

-

-

-

表2 Redis5.0 支持命令清单2

HyperLogLog

Pub/Sub(发布/订阅)

Transaction(事务)

Connection(连接)

Scripting(脚本)

Geo(地理位置)

Stream

PFADD

PSUBSCRIBE

DISCARD

AUTH

EVAL

GEOADD

XACK

PFCOUNT

PUBLISH

EXEC

ECHO

EVALSHA

GEOHASH

XADD

PFMERGE

PUBSUB

MULTI

PING

SCRIPT EXISTS

GEOPOS

XCLAIM

-

PUNSUBSCRIBE

UNWATCH

QUIT

SCRIPT FLUSH

GEODIST

XDEL

-

SUBSCRIBE

WATCH

SELECT

SCRIPT KILL

GEORADIUS

XGROUP

-

UNSUBSCRIBE

-

-

SCRIPT LOAD

GEORADIUSBYMEMBER

XINFO

-

-

-

-

-

-

XLEN

-

-

-

-

-

-

XPENDING

-

-

-

-

-

-

XRANGE

-

-

-

-

-

-

XREAD

-

-

-

-

-

-

XREADGROUP

-

-

-

-

-

-

XREVRANGE

-

-

-

-

-

-

XTRIM

Redis5.0禁用的命令

以下列出了Redis5.0实例禁用的命令。

表3 Redis 5.0单机和主备禁用命令

Key(键)

Server(服务器)

MIGRATE

SLAVEOF

-

SHUTDOWN

-

LASTSAVE

-

DEBUG相关类

-

COMMAND

-

SAVE

-

BGSAVE

-

BGREWRITEAOF

-

SYNC

-

PSYNC

表4 Redis5.0 Cluster集群禁用命令

Key(键)

Server(服务器)

Cluster

MIGRATE

SLAVEOF

CLUSTER MEET

-

SHUTDOWN

CLUSTER FLUSHSLOTS

-

LASTSAVE

CLUSTER ADDSLOTS

-

DEBUG相关类

CLUSTER DELSLOTS

-

COMMAND

CLUSTER SETSLOT

-

SAVE

CLUSTER BUMPEPOCH

-

BGSAVE

CLUSTER SAVECONFIG

-

BGREWRITEAOF

CLUSTER FORGET

-

SYNC

CLUSTER REPLICATE

-

PSYNC

CLUSTER COUNT-FAILURE-REPORTS

-

-

CLUSTER FAILOVER

-

-

CLUSTER SET-CONFIG-EPOCH

-

-

CLUSTER RESET