更新时间:2025-01-03 GMT+08:00
分享

Redis 7.0支持及禁用的命令

华为云DCS Redis 7.0完全兼容开源Redis 7。

本章节主要介绍DCS Redis 7.0命令的兼容性,包括支持命令列表,禁用命令列表。

DCS Redis缓存实例支持Redis的绝大部分命令,任何兼容Redis协议的客户端都可以访问DCS。

Redis 7.0支持的命令

各个命令的具体详细语法请前往Redis官方网站查看,例如您想了解SCAN命令的使用,可在Redis官方网站中搜索框中输入“SCAN”查询详细介绍。

表1 Redis 7.0单机/主备/Cluster集群实例支持命令清单1

Generic (Key)

String

Hash

List

Set

Sorted Set

Server

Bitmap

COPY

APPEND

HDEL

BLMOVE

SADD

BZMPOP

ACL CAT

BITCOUNT

DEL

DECR

HEXISTS

BLMPOP

SCARD

BZPOPMAX

ACL DRYRUN

BITFIELD

DUMP

DECRBY

HGET

BLPOP

SDIFF

BZPOPMIN

ACL GENPASS

BITFIELD_RO

EXISTS

GET

HGETALL

BRPOP

SDIFFSTORE

ZADD

ACL GETUSER

BITOP

EXPIRE

GETDEL

HINCRBY

BRPOPLPUSH

SINTER

ZCARD

ACL LIST

BITPOS

EXPIREAT

GETEX

HINCRBYFLOAT

LINDEX

SINTERCARD

ZCOUNT

ACL LOG

GETBIT

EXPIRETIME

GETRANGE

HKEYS

LINSERT

SINTERSTORE

ZDIFF

ACL USERS

SETBIT

KEYS

GETSET

HLEN

LLEN

SISMEMBER

ZDIFFSTORE

ACL WHOAMI

-

MOVE

INCR

HMGET

LMOVE

SMEMBERS

ZINCRBY

COMMAND COUNT

-

OBJECT ENCODING

INCRBY

HMSET

LMPOP

SMISMEMBER

ZINTER

COMMAND DOCS

-

OBJECT FREQ

INCRBYFLOAT

HRANDFIELD

LPOP

SMOVE

ZINTERCARD

COMMAND GETKEYS

-

OBJECT IDLETIME

LCS

HSCAN

LPOS

SPOP

ZINTERSTORE

COMMAND GETKEYSANDFLAGS

-

OBJECT REFCOUNT

MGET

HSET

LPUSH

SRANDMEMBER

ZLEXCOUNT

COMMAND INFO

-

PERSIST

MSET

HSETNX

LPUSHX

SREM

ZMPOP

COMMAND LIST

-

PEXPIRE

MSETNX

HSTRLEN

LRANGE

SSCAN

ZMSCORE

COMMAND

-

PEXPIREAT

PSETEX

HVALS

LREM

SUNION

ZPOPMAX

CONFIG GET

-

PEXPIRETIME

SET

-

LSET

SUNIONSTORE

ZPOPMIN

DBSIZE

-

PTTL

SETEX

-

LTRIM

-

ZRANDMEMBER

FAILOVER

-

RANDOMKEY

SETNX

-

RPOP

-

ZRANGE

FLUSHALL

-

RENAME

SETRANGE

-

RPOPLPUSH

-

ZRANGEBYLEX

FLUSHDB

-

RENAMENX

STRLEN

-

RPUSH

-

ZRANGEBYSCORE

INFO

-

RESTORE

SUBSTR

-

RPUSHX

-

ZRANGESTORE

LASTSAVE

-

SCAN

-

-

-

-

ZRANK

LATENCY DOCTOR

-

SORT

-

-

-

-

ZREM

LATENCY GRAPH

-

SORT_RO

-

-

-

-

ZREMRANGEBYLEX

LATENCY HISTOGRAM

-

TOUCH

-

-

-

-

ZREMRANGEBYRANK

LATENCY HISTORY

-

TTL

-

-

-

-

ZREMRANGEBYSCORE

LATENCY LATEST

-

TYPE

-

-

-

-

ZREVRANGE

LATENCY RESET

-

UNLINK

-

-

-

-

ZREVRANGEBYLEX

LOLWUT

-

WAIT

-

-

-

-

ZREVRANGEBYSCORE

MEMORY DOCTOR

-

WAITAOF

-

-

-

-

ZREVRANK

MEMORY MALLOC-STATS

-

-

-

-

-

-

ZSCAN

MEMORY PURGE

-

-

-

-

-

-

ZSCORE

MEMORY STATS

-

-

-

-

-

-

ZUNION

MEMORY USAGE

-

-

-

-

-

-

ZUNIONSTORE

MONITOR

-

-

-

-

-

-

-

REPLCONF

-

-

-

-

-

-

-

RESTORE-ASKING

-

-

-

-

-

-

-

ROLE

-

-

-

-

-

-

-

SLOWLOG GET

-

-

-

-

-

-

-

SLOWLOG LEN

-

-

-

-

-

-

-

SLOWLOG RESET

-

-

-

-

-

-

-

SWAPDB

-

-

-

-

-

-

-

TIME

-

表2 Redis 7.0单机/主备/Cluster集群实例支持命令清单2

HyperLoglog

Pub/Sub

Transactions

Connection

Scripting

Geo

Stream

Cluster(仅Cluster集群支持)

PFADD

PSUBSCRIBE

DISCARD

AUTH

EVAL

GEOADD

XACK

ASKING

PFCOUNT

PUBLISH

EXEC

CLIENT CACHING

EVAL_RO

GEODIST

XADD

CLUSTER COUNTKEYSINSLOT

PFDEBUG

PUBSUB CHANNELS

MULTI

CLIENT GETNAME

EVALSHA

GEOHASH

XAUTOCLAIM

CLUSTER FAILOVER

PFMERGE

PUBSUB NUMPAT

UNWATCH

CLIENT GETREDIR

EVALSHA_RO

GEOPOS

XCLAIM

CLUSTER GETKEYSINSLOT

PFSELFTEST

PUBSUB NUMSUB

WATCH

CLIENT ID

FCALL

GEORADIUS

XDEL

CLUSTER INFO

-

PUBSUB SHARDCHANNELS

-

CLIENT INFO

FCALL_RO

GEORADIUS_RO

XGROUP CREATE

CLUSTER KEYSLOT

-

PUBSUB SHARDNUMSUB

-

CLIENT KILL

FUNCTION DELETE

GEORADIUSBYMEMBER

XGROUP CREATECONSUMER

CLUSTER LINKS

-

PUNSUBSCRIBE

-

CLIENT LIST

FUNCTION DUMP

GEORADIUSBYMEMBER_RO

XGROUP DELCONSUMER

CLUSTER MYID

-

SPUBLISH

-

CLIENT NO-EVICT

FUNCTION FLUSH

GEOSEARCH

XGROUP DESTROY

CLUSTER MYSHARDID

-

SSUBSCRIBE

-

CLIENT NO-TOUCH

FUNCTION KILL

GEOSEARCHSTORE

XGROUP SETID

CLUSTER NODES

-

SUBSCRIBE

-

CLIENT PAUSE

FUNCTION LIST

-

XINFO CONSUMERS

CLUSTER REPLICAS

-

SUNSUBSCRIBE

-

CLIENT REPLY

FUNCTION LOAD

-

XINFO GROUPS

CLUSTER SHARDS

-

UNSUBSCRIBE

-

CLIENT SETINFO

FUNCTION RESTORE

-

XINFO STREAM

CLUSTER SLAVES

-

-

-

CLIENT SETNAME

FUNCTION STATS

-

XLEN

CLUSTER SLOTS

-

-

-

CLIENT TRACKING

SCRIPT DEBUG

-

XPENDING

READONLY

-

-

-

CLIENT TRACKINGINFO

SCRIPT EXISTS

-

XRANGE

READWRITE

-

-

-

CLIENT UNBLOCK

SCRIPT FLUSH

-

XREAD

-

-

-

-

CLIENT UNPAUSE

SCRIPT KILL

-

XREADGROUP

-

-

-

-

ECHO

SCRIPT LOAD

-

XREVRANGE

-

-

-

-

HELLO

-

-

XSETID

-

-

-

-

PING

-

-

XTRIM

-

-

-

-

QUIT

-

-

-

-

-

-

-

RESET

-

-

-

-

-

-

-

SELECT(Cluster集群实例不支持)

-

-

-

-

Redis 7.0禁用的命令

表3 Redis 7.0单机/主备/Cluster集群实例的禁用命令

Generic (Key)

Server

Cluster

MIGRATE

ACL DELUSER

CLUSTER ADDSLOTS

-

ACL LOAD

CLUSTER ADDSLOTSRANGE

-

ACL SAVE

CLUSTER BUMPEPOCH

-

ACL SETUSER

CLUSTER COUNT-FAILURE-REPORTS

-

BGREWRITEAOF

CLUSTER DELSLOTS

-

BGSAVE

CLUSTER DELSLOTSRANGE

-

CONFIG RESETSTAT

CLUSTER FLUSHSLOTS

-

CONFIG SET

CLUSTER FORGET

-

CONFIG REWRITE

CLUSTER MEET

-

MODULE LIST

CLUSTER REPLICATE

-

MODULE LOAD

CLUSTER RESET

-

MODULE LOADEX

CLUSTER SAVECONFIG

-

MODULE UNLOAD

CLUSTER SET-CONFIG-EPOCH

-

PSYNC

CLUSTER SETSLOT

-

REPLICAOF

-

-

SAVE

-

-

SHUTDOWN

-

-

SLAVEOF

-

-

SYNC

-

-

DEBUG

-

支持重命名的命令

表4 支持重命名的命令

支持重命名的命令

command、keys、flushdb、flushall、hgetall、scan、hscan、sscan、和zscan

Proxy集群实例还支持dbsize和dbstats命令重命名,其他命令暂时不支持。

重命名的方式

请参考命令重命名

相关文档