Skip to content

Redis generic commands (23/26 implemented)

DEL

Deletes one or more keys.

DUMP

Returns a serialized representation of the value stored at a key.

EXISTS

Determines whether one or more keys exist.

EXPIRE

Sets the expiration time of a key in seconds.

EXPIREAT

Sets the expiration time of a key to a Unix timestamp.

EXPIRETIME

Returns the expiration time of a key as a Unix timestamp.

KEYS

Returns all key names that match a pattern.

MOVE

Moves a key to another database.

PERSIST

Removes the expiration time of a key.

PEXPIRE

Sets the expiration time of a key in milliseconds.

PEXPIREAT

Sets the expiration time of a key to a Unix milliseconds timestamp.

PEXPIRETIME

Returns the expiration time of a key as a Unix milliseconds timestamp.

PTTL

Returns the expiration time in milliseconds of a key.

RANDOMKEY

Returns a random key name from the database.

RENAME

Renames a key and overwrites the destination.

RENAMENX

Renames a key only when the target key name doesn't exist.

RESTORE

Creates a key from the serialized representation of a value.

SCAN

Iterates over the key names in the database.

SORT

Sorts the elements in a list, a set, or a sorted set, optionally storing the result.

SORT_RO

Returns the sorted elements of a list, a set, or a sorted set.

TTL

Returns the expiration time in seconds of a key.

TYPE

Determines the type of value stored at a key.

Asynchronously deletes one or more keys.

Unsupported generic commands

To implement support for a command, see here

COPY (not implemented)

Copies the value of a key to a new key.

WAIT (not implemented)

Blocks until the asynchronous replication of all preceding write commands sent by the connection is completed.

WAITAOF (not implemented)

Blocks until all of the preceding write commands sent by the connection are written to the append-only file of the master and/or replicas.