kevy4.0

RENAME

Rename a key, overwriting the destination (write routed at the runtime Op level).

RENAME key newkey
Group
Generic
Since
1.0.0
Arity
exactly 3
Flags
write

Complexity

O(1) for a string value; O(M) for a collection of M elements (the entry's weight is re-derived by walking the value)

Complexity and compatibility are read out of kevy's implementation, not copied from Redis's reference. Several genuinely differ.

Redis compatibility

Differs

a cross-shard rename is a non-atomic Take then Put — there is a window in which neither key is visible; co-locate the two keys with a {hashtag} for the atomic path

See also

DELEXISTSEXPIREEXPIREATPERSISTPEXPIREPEXPIREATPTTLRENAMENXTTLTYPEUNLINK

← All commands