API 文档

命令兼容性

最近更新时间:2020-11-19 17:10:20

各版本命令兼容性列表

下表中 ✓ 表示支持,x 表示不支持,- 表示该命令不存在跨 Slot 访问的场景:

命令族 命令 2.8内存版(标准架构) 4.0内存版(标准架构) 4.0内存版/混合存储版(集群架构) 5.0内存版(标准架构) 5.0内存版(集群架构) 内存版(集群架构)跨 Slot 支持
connection 族 auth -
echo -
ping 自定义 自定义 -
quit -
select -
swapdb x -
hash 族 hdel -
hexists -
hget -
hgetall -
hincrby -
hincrbyfloat -
hkeys -
hlen -
hmget -
hmset -
hset -
hsetnx -
hstrlen -
hvals -
hscan -
keys 族 del
scan 自定义 自定义 -
exists
expire -
expireat -
keys 自定义 自定义 -
type -
move -
ttl -
persist -
pexpire -
pexpireat -
pttl -
randomkey -
rename x
renamenx x
sort -
list 族 lindex -
linsert -
llen -
lpop -
lpush -
lpushx -
lrange -
lrem -
lset -
ltrim -
rpop -
rpoplpush x
rpush -
rpushx -
blpop x
brpop x
brpoplpush x
pub/sub 族 psubscribe -
pubsub -
publish -
punsubscribe -
subscribe -
unsubscribe -
sets 族 sadd -
scard -
sdiff x
sdiffstore x
sinter x
sinterstore x
sismember -
smembers -
smove x
spop -
srandmember -
srem -
sscan -
sunion x
sunionstore x
sorted sets 族 zadd -
zcard -
zcount -
zincrby -
zinterstore x
zlexcount -
zrange -
zrangebylex -
zrangebyscore -
zrank -
zrem -
zremrangebylex -
zremrangebyrank -
zremrangebyscore -
zrevrange -
zrevrangebylex -
zrevrangebyscore -
zscore -
zrevrank -
zscan -
zunionstore x
zpopmax x x x -
zpopmin x x x -
bzpopmax x x x -
bzpopmin x x x -
strings 族 append -
bitcount -
bitop x
bitpos -
decr -
decrby -
get -
getbit -
getrange -
getset -
incr -
incrby -
incrbyfloat -
mget
mset
msetnx x
psetex -
setex -
set -
setbit -
setnx -
setrange -
strlen -
bitfield x -
transactions 族 discard -
exec -
multi -
unwatch -
watch -
hyperloglog 族 pfadd -
pfcount x
pfmerge x
scripting 族 eval x
evalsha x
script debug -
script exists x
script flush -
script load -
script kill -
geo 族 geoadd x -
geohash x -
geopos x -
geodist x -
georadius x -
georadiusbymember x -
keys 族 touch -
restore -
object x x x x x -
unlink x x
wait x x x x x -
migrate x x x x x -
dump -
server 族 bgrewriteaof x x x x x -
bgsave x x x x x -
client kill x x x x x -
sync x x x x x -
psync x x x x x -
client list -
client getname x x x x x -
client pause x x x x x -
client reply x x x x x -
client setname x x x x x -
command count x x x x x -
command getkeys x x x x x -
command info x x x x x -
slaveof x x x x x -
config rewrite x x x x x -
config set x x x x x -
config resetstat x x x x x -
debug object x x x x x -
debug segfault x x x x x -
role x x x x x -
save x x x x x -
lastsave x x x x x -
shutdown x x x x x -
MEMORY x 自定义 自定义 -
command -
dbsize -
info 自定义 自定义 -
time -
client list -
config get -
monitor 自定义 自定义 -
flushdb 自定义 自定义 -
flushall -
slowlog 自定义 自定义 -
cluster keyslot x x x -
cluster nodes x x x -
cluster getkeysinslot x x x -
cluster 其他 x x x x x -
module x x x x x -
lolwut x x x -
Stream 族 xinfo x x x -
xadd x x x -
xtrim x x x -
xdel x x x -
xrange x x x -
xrevrange x x x -
xlen x x x -
xread x x x x
xgroup x x x -
xreadgroup x x x x
xack x x x -
xlclaim x x x -
xpending x x x -