API 文档

命令兼容性

最近更新时间:2021-12-28 09:36:04

各版本命令兼容性列表

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

命令族命令2.8内存版(标准架构)4.0内存版(标准架构)4.0内存版(集群架构)5.0内存版(标准架构)5.0内存版(集群架构)内存版(集群架构)跨 Slot 支持
connection 族 auth -
echo -
ping -
quit -
select -
swapdb xxx-
hash 族 hdel -
hexists -
hget -
hgetall -
hincrby -
hincrbyfloat -
hkeys -
hlen -
hmget -
hmset -
hset -
hsetnx -
hstrlen x-
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 xxx-
zpopmin xxx-
bzpopmax xxx-
bzpopmin xxx-
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 xxxxx-
script exists x
script flush -
script load -
script kill -
geo 族 geoadd x-
geohash x-
geopos x-
geodist x-
georadius x-
georadiusbymember x-
keys 族 touch x-
restore -
object -
unlink xx
wait xxx-
migrate xxxxx-
dump -
server 族 bgrewriteaof xxxxx-
bgsave xxxxx-
client kill xxxxx-
sync xxxxx-
psync xxxxx-
client list -
client getname -
client pause xxxxx-
client reply xxxxx-
client setname -
command count -
command getkeys x-
command info -
slaveof xxxxx-
config rewrite -
config set xxxxx-
config resetstat -
debug object xxxxx-
debug segfault xxxxx-
role -
save xxxxx-
lastsave -
shutdown xxxxx-
MEMORY xxx-
command -
dbsize xx-
info -
time -
config get -
monitor -
flushdb -
flushall -
slowlog xx-
cluster keyslot xxx-
cluster nodes xxx-
cluster getkeysinslot xxx-
cluster slots xxx-
cluster info xxx-
cluster countkeysinslot xxx-
cluster 其他 xxxxx-
module xxxxx-
lolwut xxxx-
Stream 族 xinfo xxx-
xadd xxx-
xtrim xxx-
xdel xxx-
xrange xxx-
xrevrange xxx-
xlen xxx-
xread xxxx
xgroup xxx-
xreadgroup xxxx
xack xxx-
xclaim xxx-
xpending xxx-