Redis5.0命令
DCS Redis5.0基于开源5.0.9版本进行开发,兼容开源的协议和命令。
本章节主要介绍DCS Redis5.0命令的兼容性,包括支持命令列表,禁用命令列表。命令的具体详细语法,请前往Redis官方网站查看。
DCS Redis缓存实例支持Redis的绝大部分命令,具体支持的命令,请参考Redis5.0支持的命令,任何兼容Redis协议的客户端都可以访问DCS。
- 因安全原因,部分Redis命令在分布式缓存服务中被禁用,具体请见Redis5.0禁用的命令。
- DCS集群实例支持多个key,但不支持跨slot访问的Redis命令列表,如集群实例受限使用命令所示。
- 部分Redis命令使用时有限制,具体请见部分命令使用限制。
Redis5.0支持的命令
以下列出了Redis5.0实例支持的命令。
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 |
- |
- |
- |
- |
- |
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实例禁用的命令。
Key(键) |
Server(服务器) |
---|---|
MIGRATE |
SLAVEOF |
- |
SHUTDOWN |
- |
LASTSAVE |
- |
DEBUG相关类 |
- |
COMMAND |
- |
SAVE |
- |
BGSAVE |
- |
BGREWRITEAOF |
- |
SYNC |
- |
PSYNC |
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 |