命令兼容性

最近更新时间:2019-07-12 18:33:29

各版本命令兼容性说明如下表:

命令族 命令 2.8标准版 4.0标准版 4.0集群版 4.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 x
expire -
expireat -
keys 自定义 -
type -
move -
ttl -
persist -
pexpire -
pexpireat -
pttl -
randomkey -
rename -
renamenx -
sort -
list 族 lindex -
linsert -
llen -
lpop -
lpush -
lpushx -
lrange -
lrem -
lset -
ltrim -
rpop -
rpoplpush -
rpush -
rpushx -
blpop x
brpop x
brpoplpush -
pub/sub 族 psubscribe -
pubsub -
publish -
punsubscribe -
subscribe -
unsubscribe -
sets 族 sadd -
scard -
sdiff x
sdiffstore x
sinter x
sinterstore x
sismember -
smembers -
smove -
spop -
srandmember -
srem -
sscan -
sunion x
sunionstore -
sorted sets 族 zadd -
zcard -
zcount -
zincrby -
zinterstore -
zlexcount -
zrange -
zrangebylex -
zrangebyscore -
zrank -
zrem -
zremrangebylex -
zremrangebyrank -
zremrangebyscore -
zrevrange -
zrevrangebylex -
zrevrangebyscore -
zscore -
zrevrank -
zscan -
zunionstore -
strings 族 append -
bitcount -
bitop -
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 -
evalsha -
script debug -
script exists -
script flush -
script load -
script kill -
geo 族 geoadd x -
geohash x -
geopos x -
geodist x -
georadius x -
georadiusbymember x -
keys 族 touch x x x -
restore x x x -
object x x x -
unlink x x
wait x x x -
migrate x x x -
dump -
server 族 bgrewriteaof x x x -
bgsave x x x -
client kill x x x -
sync x x x -
psync x x x -
clieny list -
client getname x x x -
client pause x x x -
client reply x x x -
client setname x x x -
command count x x x -
command getkeys x x x -
command info x x x -
slaveof x x x -
config rewrite x x x -
config set x x x -
config resetstat x x x -
debug object x x x -
debug segfault x x x -
role x x x -
save x x x -
lastsave x x x -
shutdown x x x -
MEMORY x 自定义 -
command -
dbsize -
info 自定义 -
time -
client list -
config get -
monitor 自定义 -
flushdb 自定义 -
flushall -
slowlog 自定义 -
cluster keyslot x x -
cluster nodes x x -
cluster getkeysinslot x x -
cluster 其他 x x x -
module x x x -