Keys
Commands that work on any key, whatever its type: whether it exists, deleting and renaming it, when it expires, its type, and walking the keyspace.
COPY: Copies the value at source to destination, with its expiry.DEL: Deletes the given keys, of any type.DUMP: Serializes the value at key into a payload that RESTORE turns back into the value.EXISTS: Counts how many of the given keys exist.EXPIRE: Makes key expire after seconds.EXPIREAT: Makes key expire at a Unix time, in seconds.EXPIRETIME: Returns the Unix time, in seconds, at which key expires.KEYS: Returns every key of the current database that matches a glob-style pattern.MOVE: Moves key to database db.OBJECT: Inspects how a key's value is stored and used.OBJECT ENCODING: Returns the name of the encoding Redis would use for the value at key, from the value's size and the *-max-listpack-* and set-max-intset-entries settings.OBJECT FREQ: Returns the key's use count: a number that grows with how often the key is used, logarithmically, and falls with time, as Redis's LFU counter does.OBJECT HELP: Lists the OBJECT subcommands and what each does.OBJECT IDLETIME: Returns how many seconds ago key was last read or written.OBJECT REFCOUNT: Returns 1 for a key that exists: in KiviDB a value is not shared between keys.
PERSIST: Removes the expiry of key, so that it is kept until deleted.PEXPIRE: Makes key expire after milliseconds.PEXPIREAT: Makes key expire at a Unix time, in milliseconds.PEXPIRETIME: Returns the Unix time, in milliseconds, at which key expires.PTTL: Returns how long key has before it expires, in milliseconds.RANDOMKEY: Returns a key of the current database, picked at random.RENAME: Renames source to destination, with its expiry.RENAMENX: Renames source to destination only if destination does not exist.RESTORE: Creates key from a DUMP payload.SCAN: Goes through the keys of the current database a page at a time.SORT: Sorts the elements of a list, set or sorted set, as numbers unless ALPHA is given.SORT_RO: SORT without STORE: it only reads, so it can be sent to a read-only replica.SWAPDB: Swaps the contents of two databases in one step, keys and expiries together.TOUCH: Counts how many of the given keys exist.TTL: Returns how long key has before it expires, in seconds.TYPE: Returns the type of the value at key.UNLINK: Deletes the given keys, like DEL, but frees large values in the background.