分布式緩存服務經典版Redis5.0基于開源5.0.5版本進行開發,兼容開源的協議和命令,支持Redis的絕大部分命令,任何兼容Redis協議的客戶端都可以訪問Redis實例。分布式緩存基礎版Redis5.0基于開源5.0.5二次開發,兼容開源的協議和命令,支持Redis的全部命令。本章節介紹2.8/4.0/5.0經典版單機、主備、集群單機、集群主備支持和不支持/禁用的命令。
經典版單機/主備支持的命令清單
| Key |
String |
List |
Set |
SortedSet |
Hash |
Server |
| del |
append |
blpop |
sadd |
zadd |
hdel |
del |
| dump |
bitcount |
brpop |
scard |
zcard |
hexists |
dump |
| exists |
bitop |
brpoplrush |
sdiff |
zcount |
hget |
exists |
| expire |
bitpos |
lindex |
sdiffstore |
zincrby |
hgetall |
expire |
| move |
decr |
linsert |
sinter |
zrange |
hincrby |
move |
| persist |
decrby |
llen |
sinterstore |
zrangebyscore |
hincrbyfloat |
persist |
| pttl |
get |
lpop |
sismember |
zrank |
hkeys |
pttl |
| randomkey |
getrange |
lpushx |
smembers |
zremrangebyrank |
hmget |
randomkey |
| rename |
getset |
lrange |
smove |
zremrangebycore |
hmset |
rename |
| renamenx |
incr |
lrem |
spop |
zrevrange |
hset |
renamenx |
| restore |
incrby |
lset |
srandmember |
zrevrangebyscore |
hsetnx |
restore |
| sort |
incrbyfloat |
ltrim |
srem |
zrevrank |
hvals |
sort |
| ttl |
mget |
rpop |
sunion |
zscore |
hscan |
ttl |
| type |
mset |
rpoplpu |
sunionstore |
zunionstore |
hstrlen |
type |
| scan |
msetnx |
rpoplpush |
sscan |
zinterstore |
hlen |
scan |
| object |
psetex |
rpush |
- |
zscan |
- |
object |
| pexpireat |
set |
rpushx |
- |
zrangebylex |
- |
pexpireat |
| pexpire |
setbit |
lpush |
- |
zlexcount |
- |
pexpire |
| - |
setex |
- |
- |
zpopmin |
- |
- |
| - |
setnx |
- |
- |
zpopmax |
- |
- |
| - |
setrange |
- |
- |
zremrangebyscore |
- |
- |
| - |
strlen |
- |
- |
zrem |
- |
- |
| - |
bitfield |
- |
- |
- |
- |
- |
| HyperLoglog |
Pub/Sub |
Transactions |
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(cluster集群實例不支持) |
script kill |
georadius |
xgroup |
| - |
unsubscribe |
- |
- |
script load |
georadiusbymember |
xinfo |
| - |
- |
- |
- |
- |
- |
xlen |
| - |
- |
- |
- |
- |
- |
xpending |
| - |
- |
- |
- |
- |
- |
xrange |
| - |
- |
- |
- |
- |
- |
xread |
| - |
- |
- |
- |
- |
- |
xreadgroup |
| - |
- |
- |
- |
- |
- |
xrevrange |
| - |
- |
- |
- |
- |
- |
xtrim |
經典版集群單機/主備支持的命令清單
| Key |
String |
List |
Set |
SortedSet |
Hash |
| exists |
set |
lpop |
sadd |
zadd |
hdel |
| del |
get |
lpush |
scard |
zcard |
hexists |
| type |
strlen |
llen |
sismember |
zcount |
hget |
| expire |
append |
lrange |
smembers |
zincrby |
hgetAll |
| persist |
decrBy |
rpop |
srem |
zrange |
hkeys |
| ttl |
decr |
rpush |
spop |
zrangeWithScores |
hlen |
| pexpire |
incr |
lindex |
sscan |
zrangeByScore |
hmget |
| pttl |
incrBy |
linsert |
- |
zrem |
hmset |
| lock |
getrange |
lpushx |
- |
zscore |
hset |
| unlock |
getSet |
lrem |
- |
zremrangeByRank |
hsetnx |
| scan |
setex |
lset |
- |
zremrangeByScore |
hincrBy |
| dump |
setnx |
ltrim |
- |
zrank |
hvals |
| expireat |
setrange |
rpushx |
- |
zrevrange |
hincrbyfloat |
| move |
bitcount |
- |
- |
zrevrangebyscore |
hstrlen |
| object |
bitpos |
- |
- |
zrevrank |
- |
| pexpireat |
getbit |
- |
- |
zscan |
- |
| randomkey |
psetex |
- |
- |
zrangebylex |
- |
| restore |
setbit |
- |
- |
zlexcount |
- |
| sort |
mget |
- |
- |
zremrangebylex |
- |
| keys |
mset |
- |
- |
ZPOPMAX |
- |
| unlink |
- |
- |
- |
ZPOPMIN |
- |
| Connection |
GEO |
Server |
Streams |
Pub/Sub |
| auth |
geoadd |
flushdb |
XADD |
publish |
| ping |
geohash |
dbsize |
XDEL |
Subscribe |
| select |
geopos |
client list |
XLEN |
unsubscribe |
| echo |
geodist |
Client kill |
XRANGE |
Pubsub |
| quit |
georadius |
- |
XREVRANGE |
psubscribe |
| - |
georadiusbymember |
- |
XPENDING |
punsubscribe |
| - |
- |
- |
XACK |
- |
| - |
- |
- |
XCLAIM |
- |
| - |
- |
- |
XTRIM |
- |
| - |
- |
- |
XGROUP |
- |
| - |
- |
- |
XINFO |
- |
經典版單機/主備禁用的命令清單
| Server |
| save |
| bgsave |
| bgrewriteaof |
| sync |
| psync |
經典版集群單機/主備禁用的命令清單
| Key |
Script |
Server |
HyperLogLog |
Connection |
Transactions |
| wait |
eval |
bgrewriteaof |
pfcount |
swapdb |
discard |
| migrate |
evalsha |
bgsave |
pfmerge |
- |
exec |
| rename |
script exists |
client getname |
- |
- |
multi |
| renamenx |
script flush |
client kill |
- |
- |
unwatch |
| touch |
script kill |
client setname |
- |
- |
watch |
| - |
script load |
config get |
- |
- |
- |
| - |
- |
config resetstat |
- |
- |
- |
| - |
- |
config rewrite |
- |
- |
- |
| - |
- |
config set |
- |
- |
- |
| - |
- |
debug object |
- |
- |
- |
| - |
- |
debug segfault |
- |
- |
- |
| - |
- |
flushall |
- |
- |
- |
| - |
- |
info |
- |
- |
- |
| - |
- |
lastsave |
- |
- |
- |
| - |
- |
monitor |
- |
- |
- |
| - |
- |
psync |
- |
- |
- |
| - |
- |
save |
- |
- |
- |
| - |
- |
shutdown |
- |
- |
- |
| - |
- |
slaveof |
- |
- |
- |
| - |
- |
slowlog |
- |
- |
- |
| - |
- |
sync |
- |
- |
- |
| - |
- |
time |
- |
- |
- |
| List |
Set |
Sorted Set |
Streams |
Cluster |
| blpop |
smove |
bzpopmin |
xread |
所有cluster命令皆不支持 |
| brpop |
srandmember |
bzpopmax |
xreadgroup |
- |
| brpoplpush |
- |
zinterstore |
- |
- |
| rpoplpush |
- |
zrevrangebylex |
- |
- |
| - |
- |
zunionstore |
- |
- |