恢复询问
Syntax
RESTORE-ASKING key ttl serialized-value [REPLACE] [ABSTTL] [IDLETIME seconds] [FREQ frequency]
- Available since:
- 3.0.0
- Time complexity:
- O(1) to create the new key and additional O(N*M) to reconstruct the serialized value, where N is the number of Redis objects composing the value and M their average size. For small string values the time complexity is thus O(1)+O(1*M) where M is small, so simply O(1). However for sorted set values the complexity is O(N*M*log(N)) because inserting values into sorted sets is O(log(N)).
- ACL categories:
-
@keyspace,@write,@slow,@dangerous,
RESTORE-ASKING 命令是一个内部命令。
它由 Redis 集群主节点在槽迁移期间使用。
RESP2/RESP3 回复
Simple string reply:OK.
历史
- 从 Redis 版本 3.0.0 开始:添加了
REPLACE修饰符。 - 从 Redis 5.0.0 版本开始:添加了
ABSTTL修饰符。 - 从Redis版本5.0.0开始:添加了
IDLETIME和FREQ选项。