Redis4.0、5.0、6.2、7.0标准架构与集群架构均支持 touch、restore、object、unlink、wait、dump、del、scan、exists、expire、expireat、keys、type、move、ttl、persist、pexpire、pexpireat、pttl、randomkey、rename、renamenx、sort 命令,均不支持 migrate、copy 命令。仅6.2、7.0版本支持 object help。
Redis2.8版本标准架构不支持 touch、unlink、wait、migrate 命令。
集群架构跨 Slot 场景,支持 del、exists 命令,不支持 unlink、rename、renamenx。
Redis 7.0 新增:sort_ro、expiretime、pexpiretime。
具体信息,请参见下表。✓ 表示支持,x 表示不支持,- 表示该命令不存在跨 Slot 访问的场景。
命令 | 2.8 内存版(标准架构) | 4.0 内存版(标准架构) | 4.0 内存版(集群架构) | 5.0 内存版(标准架构) | 5.0 内存版(集群架构) |
6.2 内存版(标准架构)
|
6.2 内存版(集群架构)
|
7.0 内存版(标准架构)
|
7.0 内存版(集群架构)
| 内存版(集群架构)跨 Slot 支持 |
touch | x | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | - |
restore | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | - |
object | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | - |
object help | x | x | x | x | x | ✓ | ✓ | ✓ | ✓ | - |
unlink | x | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | x |
wait | x | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | - |
migrate | x | x | x | x | x | x | x | x | x | - |
dump | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | - |
del | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
scan | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | - |
exists | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
expire | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | - |
expireat | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | - |
keys | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | - |
type | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | - |
move | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | - |
ttl | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | - |
persist | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | - |
pexpire | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | - |
pexpireat | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | - |
pttl | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | - |
randomkey | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | - |
rename | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | x |
renamenx | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | x |
sort | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | - |
sort_ro | x | x | x | x | x | x | x | ✓ | ✓ | - |
copy | x | x | x | x | x | x | x | x | x | - |
expiretime | x | x | x | x | x | x | x | ✓ | ✓ | - |
pexpiretime | x | x | x | x | x | x | x | ✓ | ✓ | - |