RESTORE-ASKING

RESTORE-ASKING key ttl serialized-value [REPLACE] [ABSTTL]
  [IDLETIME seconds] [FREQ frequency]
Available since:
Redis Open Source 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,
Compatibility:
Redis Software and Redis Cloud compatibility

The RESTORE-ASKING command is an internal command. It is used by a Redis cluster master during slot migration.

Required arguments

key

The name of the key to create.

ttl

The time to live for the key, in milliseconds. 0 means no expiration. With ABSTTL, this is an absolute Unix timestamp in milliseconds.

serialized-value

The serialized value, as produced by DUMP.

Optional arguments

REPLACE

Replace the key if it already exists.

ABSTTL

Interpret ttl as an absolute Unix timestamp in milliseconds rather than a relative time.

IDLETIME seconds

Set the key's idle time (for LRU eviction) to this many seconds.

FREQ frequency

Set the key's access-frequency counter (for LFU eviction) to this value.

Redis Software and Redis Cloud compatibility

Redis
Software
Redis
Cloud
Notes
❌ Standard
❌ Active-Active
❌ Standard
❌ Active-Active

Return information

History

  • Starting with Redis version 3.0.0: Added the REPLACE modifier.
  • Starting with Redis version 5.0.0: Added the ABSTTL modifier.
  • Starting with Redis version 5.0.0: Added the IDLETIME and FREQ options.
RATE THIS PAGE
Back to top ↑