The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Net::Async::Redis::Commands - mixin that defines the Redis commands available

DESCRIPTION

This is autogenerated from the list of commands available in https://redis.io/commands.

It is intended to be loaded by Net::Async::Redis to provide methods for each available Redis command.

PACKAGE VARIABLES

KEY_FINDER

This maps the argument index for the key information in each command.

METHODS - Bitmap

bitcount

Count set bits in a string.

  • key

  • [start end [BYTE|BIT]]

https://redis.io/commands/bitcount

bitfield

Perform arbitrary bitfield integer operations on strings.

  • key

  • [GET encoding offset]

  • [SET encoding offset value]

  • [INCRBY encoding offset increment]

  • [OVERFLOW WRAP|SAT|FAIL]

https://redis.io/commands/bitfield

bitfield_ro

Perform arbitrary bitfield integer operations on strings. Read-only variant of BITFIELD.

  • key

  • GET encoding offset

https://redis.io/commands/bitfield-ro

bitop

Perform bitwise operations between strings.

  • operation

  • destkey

  • key [key ...]

https://redis.io/commands/bitop

bitpos

Find first bit set or clear in a string.

  • key

  • bit

  • [start [end [BYTE|BIT]]]

https://redis.io/commands/bitpos

getbit

Returns the bit value at offset in the string value stored at key.

  • key

  • offset

https://redis.io/commands/getbit

setbit

Sets or clears the bit at offset in the string value stored at key.

  • key

  • offset

  • value

https://redis.io/commands/setbit

METHODS - Cluster

asking

Sent by cluster clients after an -ASK redirect.

https://redis.io/commands/asking

cluster_addslots

Assign new hash slots to receiving node.

  • slot [slot ...]

https://redis.io/commands/cluster-addslots

cluster_addslotsrange

Assign new hash slots to receiving node.

  • start-slot end-slot [start-slot end-slot ...]

https://redis.io/commands/cluster-addslotsrange

cluster_bumpepoch

Advance the cluster config epoch.

https://redis.io/commands/cluster-bumpepoch

cluster_count_failure_reports

Return the number of failure reports active for a given node.

  • node-id

https://redis.io/commands/cluster-count-failure-reports

cluster_countkeysinslot

Return the number of local keys in the specified hash slot.

  • slot

https://redis.io/commands/cluster-countkeysinslot

cluster_delslots

Set hash slots as unbound in receiving node.

  • slot [slot ...]

https://redis.io/commands/cluster-delslots

cluster_delslotsrange

Set hash slots as unbound in receiving node.

  • start-slot end-slot [start-slot end-slot ...]

https://redis.io/commands/cluster-delslotsrange

cluster_failover

Forces a replica to perform a manual failover of its master.

  • [FORCE|TAKEOVER]

https://redis.io/commands/cluster-failover

cluster_flushslots

Delete a node's own slots information.

https://redis.io/commands/cluster-flushslots

cluster_forget

Remove a node from the nodes table.

  • node-id

https://redis.io/commands/cluster-forget

cluster_getkeysinslot

Return local key names in the specified hash slot.

  • slot

  • count

https://redis.io/commands/cluster-getkeysinslot

cluster_info

Provides info about Redis Cluster node state.

https://redis.io/commands/cluster-info

cluster_keyslot

Returns the hash slot of the specified key.

  • key

https://redis.io/commands/cluster-keyslot

Returns a list of all TCP links to and from peer nodes in cluster.

https://redis.io/commands/cluster-links

cluster_meet

Force a node cluster to handshake with another node.

  • ip

  • port

https://redis.io/commands/cluster-meet

cluster_myid

Return the node id.

https://redis.io/commands/cluster-myid

cluster_nodes

Get Cluster config for the node.

https://redis.io/commands/cluster-nodes

cluster_replicas

List replica nodes of the specified master node.

  • node-id

https://redis.io/commands/cluster-replicas

cluster_replicate

Reconfigure a node as a replica of the specified master node.

  • node-id

https://redis.io/commands/cluster-replicate

cluster_reset

Reset a Redis Cluster node.

  • [HARD|SOFT]

https://redis.io/commands/cluster-reset

cluster_saveconfig

Forces the node to save cluster state on disk.

https://redis.io/commands/cluster-saveconfig

cluster_set_config_epoch

Set the configuration epoch in a new node.

  • config-epoch

https://redis.io/commands/cluster-set-config-epoch

cluster_setslot

Bind a hash slot to a specific node.

  • slot

  • IMPORTING node-id|MIGRATING node-id|NODE node-id|STABLE

https://redis.io/commands/cluster-setslot

cluster_slaves

List replica nodes of the specified master node.

  • node-id

https://redis.io/commands/cluster-slaves

cluster_slots

Get array of Cluster slot to node mappings.

https://redis.io/commands/cluster-slots

readonly

Enables read queries for a connection to a cluster replica node.

https://redis.io/commands/readonly

readwrite

Disables read queries for a connection to a cluster replica node.

https://redis.io/commands/readwrite

METHODS - Connection

auth

Authenticate to the server.

  • [username]

  • password

https://redis.io/commands/auth

client_caching

Instruct the server about tracking or not keys in the next request.

  • YES|NO

https://redis.io/commands/client-caching

client_getname

Get the current connection name.

https://redis.io/commands/client-getname

client_getredir

Get tracking notifications redirection client ID if any.

https://redis.io/commands/client-getredir

client_id

Returns the client ID for the current connection.

https://redis.io/commands/client-id

client_info

Returns information about the current client connection.

https://redis.io/commands/client-info

client_kill

Kill the connection of a client.

  • [ip:port]

  • [ID client-id]

  • [TYPE NORMAL|MASTER|SLAVE|REPLICA|PUBSUB]

  • [USER username]

  • [ADDR ip:port]

  • [LADDR ip:port]

  • [SKIPME yes/no]

https://redis.io/commands/client-kill

client_list

Get the list of client connections.

  • [TYPE NORMAL|MASTER|REPLICA|PUBSUB]

  • [ID client-id [client-id ...]]

https://redis.io/commands/client-list

client_no_evict

Set client eviction mode for the current connection.

  • ON|OFF

https://redis.io/commands/client-no-evict

client_pause

Stop processing commands from clients for some time.

  • timeout

  • [WRITE|ALL]

https://redis.io/commands/client-pause

client_reply

Instruct the server whether to reply to commands.

  • ON|OFF|SKIP

https://redis.io/commands/client-reply

client_setname

Set the current connection name.

  • connection-name

https://redis.io/commands/client-setname

client_tracking

Enable or disable server assisted client side caching support.

  • ON|OFF

  • [REDIRECT client-id]

  • [PREFIX prefix [PREFIX prefix ...]]

  • [BCAST]

  • [OPTIN]

  • [OPTOUT]

  • [NOLOOP]

https://redis.io/commands/client-tracking

client_trackinginfo

Return information about server assisted client side caching for the current connection.

https://redis.io/commands/client-trackinginfo

client_unblock

Unblock a client blocked in a blocking command from a different connection.

  • client-id

  • [TIMEOUT|ERROR]

https://redis.io/commands/client-unblock

client_unpause

Resume processing of clients that were paused.

https://redis.io/commands/client-unpause

echo

Echo the given string.

  • message

https://redis.io/commands/echo

hello

Handshake with Redis.

  • [protover [AUTH username password] [SETNAME clientname]]

https://redis.io/commands/hello

ping

Ping the server.

  • [message]

https://redis.io/commands/ping

quit

Close the connection.

https://redis.io/commands/quit

reset

Reset the connection.

https://redis.io/commands/reset

select

Change the selected database for the current connection.

  • index

https://redis.io/commands/select

METHODS - Generic

copy

Copy a key.

  • source

  • destination

  • [DB destination-db]

  • [REPLACE]

https://redis.io/commands/copy

del

Delete a key.

  • key [key ...]

https://redis.io/commands/del

dump

Return a serialized version of the value stored at the specified key.

  • key

https://redis.io/commands/dump

exists

Determine if a key exists.

  • key [key ...]

https://redis.io/commands/exists

expire

Set a key's time to live in seconds.

  • key

  • seconds

  • [NX|XX|GT|LT]

https://redis.io/commands/expire

expireat

Set the expiration for a key as a UNIX timestamp.

  • key

  • unix-time-seconds

  • [NX|XX|GT|LT]

https://redis.io/commands/expireat

expiretime

Get the expiration Unix timestamp for a key.

  • key

https://redis.io/commands/expiretime

keys

Find all keys matching the given pattern.

  • pattern

https://redis.io/commands/keys

migrate

Atomically transfer a key from a Redis instance to another one.

  • host

  • port

  • key|""

  • destination-db

  • timeout

  • [COPY]

  • [REPLACE]

  • [AUTH password]

  • [AUTH2 username password]

  • [KEYS key [key ...]]

https://redis.io/commands/migrate

move

Move a key to another database.

  • key

  • db

https://redis.io/commands/move

object_encoding

Inspect the internal encoding of a Redis object.

  • key

https://redis.io/commands/object-encoding

object_freq

Get the logarithmic access frequency counter of a Redis object.

  • key

https://redis.io/commands/object-freq

object_idletime

Get the time since a Redis object was last accessed.

  • key

https://redis.io/commands/object-idletime

object_refcount

Get the number of references to the value of the key.

  • key

https://redis.io/commands/object-refcount

persist

Remove the expiration from a key.

  • key

https://redis.io/commands/persist

pexpire

Set a key's time to live in milliseconds.

  • key

  • milliseconds

  • [NX|XX|GT|LT]

https://redis.io/commands/pexpire

pexpireat

Set the expiration for a key as a UNIX timestamp specified in milliseconds.

  • key

  • unix-time-milliseconds

  • [NX|XX|GT|LT]

https://redis.io/commands/pexpireat

pexpiretime

Get the expiration Unix timestamp for a key in milliseconds.

  • key

https://redis.io/commands/pexpiretime

pttl

Get the time to live for a key in milliseconds.

  • key

https://redis.io/commands/pttl

randomkey

Return a random key from the keyspace.

https://redis.io/commands/randomkey

rename

Rename a key.

  • key

  • newkey

https://redis.io/commands/rename

renamenx

Rename a key, only if the new key does not exist.

  • key

  • newkey

https://redis.io/commands/renamenx

restore

Create a key using the provided serialized value, previously obtained using DUMP.

  • key

  • ttl

  • serialized-value

  • [REPLACE]

  • [ABSTTL]

  • [IDLETIME seconds]

  • [FREQ frequency]

https://redis.io/commands/restore

scan

Incrementally iterate the keys space.

  • cursor

  • [MATCH pattern]

  • [COUNT count]

  • [TYPE type]

https://redis.io/commands/scan

sort

Sort the elements in a list, set or sorted set.

  • key

  • [BY pattern]

  • [LIMIT offset count]

  • [GET pattern [GET pattern ...]]

  • [ASC|DESC]

  • [ALPHA]

  • [STORE destination]

https://redis.io/commands/sort

sort_ro

Sort the elements in a list, set or sorted set. Read-only variant of SORT.

  • key

  • [BY pattern]

  • [LIMIT offset count]

  • [GET pattern [GET pattern ...]]

  • [ASC|DESC]

  • [ALPHA]

https://redis.io/commands/sort-ro

touch

Alters the last access time of a key(s). Returns the number of existing keys specified.

  • key [key ...]

https://redis.io/commands/touch

ttl

Get the time to live for a key in seconds.

  • key

https://redis.io/commands/ttl

type

Determine the type stored at key.

  • key

https://redis.io/commands/type

Delete a key asynchronously in another thread. Otherwise it is just as DEL, but non blocking.

  • key [key ...]

https://redis.io/commands/unlink

wait

Wait for the synchronous replication of all the write commands sent in the context of the current connection.

  • numreplicas

  • timeout

https://redis.io/commands/wait

METHODS - Geo

geoadd

Add one or more geospatial items in the geospatial index represented using a sorted set.

  • key

  • [NX|XX]

  • [CH]

  • longitude latitude member [longitude latitude member ...]

https://redis.io/commands/geoadd

geodist

Returns the distance between two members of a geospatial index.

  • key

  • member1

  • member2

  • [M|KM|FT|MI]

https://redis.io/commands/geodist

geohash

Returns members of a geospatial index as standard geohash strings.

  • key

  • member [member ...]

https://redis.io/commands/geohash

geopos

Returns longitude and latitude of members of a geospatial index.

  • key

  • member [member ...]

https://redis.io/commands/geopos

georadius

Query a sorted set representing a geospatial index to fetch members matching a given maximum distance from a point.

  • key

  • longitude

  • latitude

  • radius

  • M|KM|FT|MI

  • [WITHCOORD]

  • [WITHDIST]

  • [WITHHASH]

  • [COUNT count [ANY]]

  • [ASC|DESC]

  • [STORE key]

  • [STOREDIST key]

https://redis.io/commands/georadius

georadius_ro

A read-only variant for GEORADIUS.

  • key

  • longitude

  • latitude

  • radius

  • M|KM|FT|MI

  • [WITHCOORD]

  • [WITHDIST]

  • [WITHHASH]

  • [COUNT count [ANY]]

  • [ASC|DESC]

https://redis.io/commands/georadius-ro

georadiusbymember

Query a sorted set representing a geospatial index to fetch members matching a given maximum distance from a member.

  • key

  • member

  • radius

  • M|KM|FT|MI

  • [WITHCOORD]

  • [WITHDIST]

  • [WITHHASH]

  • [COUNT count [ANY]]

  • [ASC|DESC]

  • [STORE key]

  • [STOREDIST key]

https://redis.io/commands/georadiusbymember

georadiusbymember_ro

A read-only variant for GEORADIUSBYMEMBER.

  • key

  • member

  • radius

  • M|KM|FT|MI

  • [WITHCOORD]

  • [WITHDIST]

  • [WITHHASH]

  • [COUNT count [ANY]]

  • [ASC|DESC]

https://redis.io/commands/georadiusbymember-ro

geosearch

Query a sorted set representing a geospatial index to fetch members inside an area of a box or a circle.

  • key

  • [FROMMEMBER member]

  • [FROMLONLAT longitude latitude]

  • [BYRADIUS radius M|KM|FT|MI]

  • [BYBOX width height M|KM|FT|MI]

  • [ASC|DESC]

  • [COUNT count [ANY]]

  • [WITHCOORD]

  • [WITHDIST]

  • [WITHHASH]

https://redis.io/commands/geosearch

geosearchstore

Query a sorted set representing a geospatial index to fetch members inside an area of a box or a circle, and store the result in another key.

  • destination

  • source

  • [FROMMEMBER member]

  • [FROMLONLAT longitude latitude]

  • [BYRADIUS radius M|KM|FT|MI]

  • [BYBOX width height M|KM|FT|MI]

  • [ASC|DESC]

  • [COUNT count [ANY]]

  • [STOREDIST]

https://redis.io/commands/geosearchstore

METHODS - Hash

hdel

Delete one or more hash fields.

  • key

  • field [field ...]

https://redis.io/commands/hdel

hexists

Determine if a hash field exists.

  • key

  • field

https://redis.io/commands/hexists

hget

Get the value of a hash field.

  • key

  • field

https://redis.io/commands/hget

hgetall

Get all the fields and values in a hash.

  • key

https://redis.io/commands/hgetall

hincrby

Increment the integer value of a hash field by the given number.

  • key

  • field

  • increment

https://redis.io/commands/hincrby

hincrbyfloat

Increment the float value of a hash field by the given amount.

  • key

  • field

  • increment

https://redis.io/commands/hincrbyfloat

hkeys

Get all the fields in a hash.

  • key

https://redis.io/commands/hkeys

hlen

Get the number of fields in a hash.

  • key

https://redis.io/commands/hlen

hmget

Get the values of all the given hash fields.

  • key

  • field [field ...]

https://redis.io/commands/hmget

hmset

Set multiple hash fields to multiple values.

  • key

  • field value [field value ...]

https://redis.io/commands/hmset

hrandfield

Get one or multiple random fields from a hash.

  • key

  • [count [WITHVALUES]]

https://redis.io/commands/hrandfield

hscan

Incrementally iterate hash fields and associated values.

  • key

  • cursor

  • [MATCH pattern]

  • [COUNT count]

https://redis.io/commands/hscan

hset

Set the string value of a hash field.

  • key

  • field value [field value ...]

https://redis.io/commands/hset

hsetnx

Set the value of a hash field, only if the field does not exist.

  • key

  • field

  • value

https://redis.io/commands/hsetnx

hstrlen

Get the length of the value of a hash field.

  • key

  • field

https://redis.io/commands/hstrlen

hvals

Get all the values in a hash.

  • key

https://redis.io/commands/hvals

METHODS - Hyperloglog

pfadd

Adds the specified elements to the specified HyperLogLog.

  • key

  • [element [element ...]]

https://redis.io/commands/pfadd

pfcount

Return the approximated cardinality of the set(s) observed by the HyperLogLog at key(s).

  • key [key ...]

https://redis.io/commands/pfcount

pfdebug

Internal commands for debugging HyperLogLog values.

https://redis.io/commands/pfdebug

pfmerge

Merge N different HyperLogLogs into a single one.

  • destkey

  • sourcekey [sourcekey ...]

https://redis.io/commands/pfmerge

pfselftest

An internal command for testing HyperLogLog values.

https://redis.io/commands/pfselftest

METHODS - List

blmove

Pop an element from a list, push it to another list and return it; or block until one is available.

  • source

  • destination

  • LEFT|RIGHT

  • LEFT|RIGHT

  • timeout

https://redis.io/commands/blmove

blmpop

Pop elements from a list, or block until one is available.

  • timeout

  • numkeys

  • key [key ...]

  • LEFT|RIGHT

  • [COUNT count]

https://redis.io/commands/blmpop

blpop

Remove and get the first element in a list, or block until one is available.

  • key [key ...]

  • timeout

https://redis.io/commands/blpop

brpop

Remove and get the last element in a list, or block until one is available.

  • key [key ...]

  • timeout

https://redis.io/commands/brpop

brpoplpush

Pop an element from a list, push it to another list and return it; or block until one is available.

  • source

  • destination

  • timeout

https://redis.io/commands/brpoplpush

lindex

Get an element from a list by its index.

  • key

  • index

https://redis.io/commands/lindex

linsert

Insert an element before or after another element in a list.

  • key

  • BEFORE|AFTER

  • pivot

  • element

https://redis.io/commands/linsert

llen

Get the length of a list.

  • key

https://redis.io/commands/llen

lmove

Pop an element from a list, push it to another list and return it.

  • source

  • destination

  • LEFT|RIGHT

  • LEFT|RIGHT

https://redis.io/commands/lmove

lmpop

Pop elements from a list.

  • numkeys

  • key [key ...]

  • LEFT|RIGHT

  • [COUNT count]

https://redis.io/commands/lmpop

lpop

Remove and get the first elements in a list.

  • key

  • [count]

https://redis.io/commands/lpop

lpos

Return the index of matching elements on a list.

  • key

  • element

  • [RANK rank]

  • [COUNT num-matches]

  • [MAXLEN len]

https://redis.io/commands/lpos

lpush

Prepend one or multiple elements to a list.

  • key

  • element [element ...]

https://redis.io/commands/lpush

lpushx

Prepend an element to a list, only if the list exists.

  • key

  • element [element ...]

https://redis.io/commands/lpushx

lrange

Get a range of elements from a list.

  • key

  • start

  • stop

https://redis.io/commands/lrange

lrem

Remove elements from a list.

  • key

  • count

  • element

https://redis.io/commands/lrem

lset

Set the value of an element in a list by its index.

  • key

  • index

  • element

https://redis.io/commands/lset

ltrim

Trim a list to the specified range.

  • key

  • start

  • stop

https://redis.io/commands/ltrim

rpop

Remove and get the last elements in a list.

  • key

  • [count]

https://redis.io/commands/rpop

rpoplpush

Remove the last element in a list, prepend it to another list and return it.

  • source

  • destination

https://redis.io/commands/rpoplpush

rpush

Append one or multiple elements to a list.

  • key

  • element [element ...]

https://redis.io/commands/rpush

rpushx

Append an element to a list, only if the list exists.

  • key

  • element [element ...]

https://redis.io/commands/rpushx

METHODS - Pubsub

psubscribe

Listen for messages published to channels matching the given patterns.

  • pattern [pattern ...]

https://redis.io/commands/psubscribe

publish

Post a message to a channel.

  • channel

  • message

https://redis.io/commands/publish

pubsub_channels

List active channels.

  • [pattern]

https://redis.io/commands/pubsub-channels

pubsub_numpat

Get the count of unique patterns pattern subscriptions.

https://redis.io/commands/pubsub-numpat

pubsub_numsub

Get the count of subscribers for channels.

  • [channel [channel ...]]

https://redis.io/commands/pubsub-numsub

pubsub_shardchannels

List active shard channels.

  • [pattern]

https://redis.io/commands/pubsub-shardchannels

pubsub_shardnumsub

Get the count of subscribers for shard channels.

  • [channel [channel ...]]

https://redis.io/commands/pubsub-shardnumsub

punsubscribe

Stop listening for messages posted to channels matching the given patterns.

  • [pattern [pattern ...]]

https://redis.io/commands/punsubscribe

spublish

Post a message to a shard channel.

  • channel

  • message

https://redis.io/commands/spublish

ssubscribe

Listen for messages published to the given shard channels.

  • channel [channel ...]

https://redis.io/commands/ssubscribe

subscribe

Listen for messages published to the given channels.

  • channel [channel ...]

https://redis.io/commands/subscribe

sunsubscribe

Stop listening for messages posted to the given shard channels.

  • [channel [channel ...]]

https://redis.io/commands/sunsubscribe

unsubscribe

Stop listening for messages posted to the given channels.

  • [channel [channel ...]]

https://redis.io/commands/unsubscribe

METHODS - Scripting

eval

Execute a Lua script server side.

  • script

  • numkeys

  • [key [key ...]]

  • [arg [arg ...]]

https://redis.io/commands/eval

eval_ro

Execute a read-only Lua script server side.

  • script

  • numkeys

  • key [key ...]

  • arg [arg ...]

https://redis.io/commands/eval-ro

evalsha

Execute a Lua script server side.

  • sha1

  • numkeys

  • [key [key ...]]

  • [arg [arg ...]]

https://redis.io/commands/evalsha

evalsha_ro

Execute a read-only Lua script server side.

  • sha1

  • numkeys

  • key [key ...]

  • arg [arg ...]

https://redis.io/commands/evalsha-ro

fcall

Invoke a function.

  • function

  • numkeys

  • key [key ...]

  • arg [arg ...]

https://redis.io/commands/fcall

fcall_ro

Invoke a read-only function.

  • function

  • numkeys

  • key [key ...]

  • arg [arg ...]

https://redis.io/commands/fcall-ro

function_delete

Delete a function by name.

  • library-name

https://redis.io/commands/function-delete

function_dump

Dump all functions into a serialized binary payload.

https://redis.io/commands/function-dump

function_flush

Deleting all functions.

  • [ASYNC|SYNC]

https://redis.io/commands/function-flush

function_kill

Kill the function currently in execution.

https://redis.io/commands/function-kill

function_list

List information about all the functions.

  • [LIBRARYNAME library-name-pattern]

  • [WITHCODE]

https://redis.io/commands/function-list

function_load

Create a function with the given arguments (name, code, description).

  • engine-name

  • library-name

  • [REPLACE]

  • [DESCRIPTION library-description]

  • function-code

https://redis.io/commands/function-load

function_restore

Restore all the functions on the given payload.

  • serialized-value

  • [FLUSH|APPEND|REPLACE]

https://redis.io/commands/function-restore

function_stats

Return information about the function currently running (name, description, duration).

https://redis.io/commands/function-stats

script_debug

Set the debug mode for executed scripts.

  • YES|SYNC|NO

https://redis.io/commands/script-debug

script_exists

Check existence of scripts in the script cache.

  • sha1 [sha1 ...]

https://redis.io/commands/script-exists

script_flush

Remove all the scripts from the script cache.

  • [ASYNC|SYNC]

https://redis.io/commands/script-flush

script_kill

Kill the script currently in execution.

https://redis.io/commands/script-kill

script_load

Load the specified Lua script into the script cache.

  • script

https://redis.io/commands/script-load

METHODS - Server

acl_cat

List the ACL categories or the commands inside a category.

  • [categoryname]

https://redis.io/commands/acl-cat

acl_deluser

Remove the specified ACL users and the associated rules.

  • username [username ...]

https://redis.io/commands/acl-deluser

acl_dryrun

Returns whether the user can execute the given command without executing the command.

  • username

  • command

  • [arg [arg ...]]

https://redis.io/commands/acl-dryrun

acl_genpass

Generate a pseudorandom secure password to use for ACL users.

  • [bits]

https://redis.io/commands/acl-genpass

acl_getuser

Get the rules for a specific ACL user.

  • username

https://redis.io/commands/acl-getuser

acl_list

List the current ACL rules in ACL config file format.

https://redis.io/commands/acl-list

acl_load

Reload the ACLs from the configured ACL file.

https://redis.io/commands/acl-load

acl_log

List latest events denied because of ACLs in place.

  • [count|RESET]

https://redis.io/commands/acl-log

acl_save

Save the current ACL rules in the configured ACL file.

https://redis.io/commands/acl-save

acl_setuser

Modify or create the rules for a specific ACL user.

  • username

  • [rule [rule ...]]

https://redis.io/commands/acl-setuser

acl_users

List the username of all the configured ACL rules.

https://redis.io/commands/acl-users

acl_whoami

Return the name of the user associated to the current connection.

https://redis.io/commands/acl-whoami

bgrewriteaof

Asynchronously rewrite the append-only file.

https://redis.io/commands/bgrewriteaof

bgsave

Asynchronously save the dataset to disk.

  • [SCHEDULE]

https://redis.io/commands/bgsave

command

Get array of Redis command details.

https://redis.io/commands/command

command_count

Get total number of Redis commands.

https://redis.io/commands/command-count

command_docs

Get array of specific Redis command documentation.

  • [command-name [command-name ...]]

https://redis.io/commands/command-docs

command_getkeys

Extract keys given a full Redis command.

https://redis.io/commands/command-getkeys

command_getkeysandflags

Extract keys given a full Redis command.

https://redis.io/commands/command-getkeysandflags

command_info

Get array of specific Redis command details, or all when no argument is given.

  • [command-name [command-name ...]]

https://redis.io/commands/command-info

command_list

Get an array of Redis command names.

  • [FILTERBY MODULE module-name|ACLCAT category|PATTERN pattern]

https://redis.io/commands/command-list

config_get

Get the values of configuration parameters.

  • parameter [parameter ...]

https://redis.io/commands/config-get

config_resetstat

Reset the stats returned by INFO.

https://redis.io/commands/config-resetstat

config_rewrite

Rewrite the configuration file with the in memory configuration.

https://redis.io/commands/config-rewrite

config_set

Set configuration parameters to the given values.

  • parameter value [parameter value ...]

https://redis.io/commands/config-set

dbsize

Return the number of keys in the selected database.

https://redis.io/commands/dbsize

failover

Start a coordinated failover between this server and one of its replicas.

  • [TO host port [FORCE]]

  • [ABORT]

  • [TIMEOUT milliseconds]

https://redis.io/commands/failover

flushall

Remove all keys from all databases.

  • [ASYNC|SYNC]

https://redis.io/commands/flushall

flushdb

Remove all keys from the current database.

  • [ASYNC|SYNC]

https://redis.io/commands/flushdb

info

Get information and statistics about the server.

  • [section [section ...]]

https://redis.io/commands/info

lastsave

Get the UNIX time stamp of the last successful save to disk.

https://redis.io/commands/lastsave

latency_doctor

Return a human readable latency analysis report.

https://redis.io/commands/latency-doctor

latency_graph

Return a latency graph for the event.

  • event

https://redis.io/commands/latency-graph

latency_histogram

Return the cumulative distribution of latencies of a subset of commands or all.

  • [command [command ...]]

https://redis.io/commands/latency-histogram

latency_history

Return timestamp-latency samples for the event.

  • event

https://redis.io/commands/latency-history

latency_latest

Return the latest latency samples for all events.

https://redis.io/commands/latency-latest

latency_reset

Reset latency data for one or more events.

  • [event [event ...]]

https://redis.io/commands/latency-reset

lolwut

Display some computer art and the Redis version.

  • [VERSION version]

https://redis.io/commands/lolwut

memory_doctor

Outputs memory problems report.

https://redis.io/commands/memory-doctor

memory_malloc_stats

Show allocator internal stats.

https://redis.io/commands/memory-malloc-stats

memory_purge

Ask the allocator to release memory.

https://redis.io/commands/memory-purge

memory_stats

Show memory usage details.

https://redis.io/commands/memory-stats

memory_usage

Estimate the memory usage of a key.

  • key

  • [SAMPLES count]

https://redis.io/commands/memory-usage

module_list

List all modules loaded by the server.

https://redis.io/commands/module-list

module_load

Load a module.

  • path

  • [arg [arg ...]]

https://redis.io/commands/module-load

module_unload

Unload a module.

  • name

https://redis.io/commands/module-unload

monitor

Listen for all requests received by the server in real time.

https://redis.io/commands/monitor

psync

Internal command used for replication.

  • replicationid

  • offset

https://redis.io/commands/psync

replconf

An internal command for configuring the replication stream.

https://redis.io/commands/replconf

replicaof

Make the server a replica of another instance, or promote it as master.

  • host

  • port

https://redis.io/commands/replicaof

restore_asking

An internal command for migrating keys in a cluster.

https://redis.io/commands/restore-asking

role

Return the role of the instance in the context of replication.

https://redis.io/commands/role

save

Synchronously save the dataset to disk.

https://redis.io/commands/save

shutdown

Synchronously save the dataset to disk and then shut down the server.

  • [NOSAVE|SAVE]

  • [NOW]

  • [FORCE]

  • [ABORT]

https://redis.io/commands/shutdown

slaveof

Make the server a replica of another instance, or promote it as master.

  • host

  • port

https://redis.io/commands/slaveof

slowlog_get

Get the slow log's entries.

  • [count]

https://redis.io/commands/slowlog-get

slowlog_len

Get the slow log's length.

https://redis.io/commands/slowlog-len

slowlog_reset

Clear all entries from the slow log.

https://redis.io/commands/slowlog-reset

swapdb

Swaps two Redis databases.

  • index1

  • index2

https://redis.io/commands/swapdb

sync

Internal command used for replication.

https://redis.io/commands/sync

time

Return the current server time.

https://redis.io/commands/time

METHODS - Set

sadd

Add one or more members to a set.

  • key

  • member [member ...]

https://redis.io/commands/sadd

scard

Get the number of members in a set.

  • key

https://redis.io/commands/scard

sdiff

Subtract multiple sets.

  • key [key ...]

https://redis.io/commands/sdiff

sdiffstore

Subtract multiple sets and store the resulting set in a key.

  • destination

  • key [key ...]

https://redis.io/commands/sdiffstore

sinter

Intersect multiple sets.

  • key [key ...]

https://redis.io/commands/sinter

sintercard

Intersect multiple sets and return the cardinality of the result.

  • numkeys

  • key [key ...]

  • [LIMIT limit]

https://redis.io/commands/sintercard

sinterstore

Intersect multiple sets and store the resulting set in a key.

  • destination

  • key [key ...]

https://redis.io/commands/sinterstore

sismember

Determine if a given value is a member of a set.

  • key

  • member

https://redis.io/commands/sismember

smembers

Get all the members in a set.

  • key

https://redis.io/commands/smembers

smismember

Returns the membership associated with the given elements for a set.

  • key

  • member [member ...]

https://redis.io/commands/smismember

smove

Move a member from one set to another.

  • source

  • destination

  • member

https://redis.io/commands/smove

spop

Remove and return one or multiple random members from a set.

  • key

  • [count]

https://redis.io/commands/spop

srandmember

Get one or multiple random members from a set.

  • key

  • [count]

https://redis.io/commands/srandmember

srem

Remove one or more members from a set.

  • key

  • member [member ...]

https://redis.io/commands/srem

sscan

Incrementally iterate Set elements.

  • key

  • cursor

  • [MATCH pattern]

  • [COUNT count]

https://redis.io/commands/sscan

sunion

Add multiple sets.

  • key [key ...]

https://redis.io/commands/sunion

sunionstore

Add multiple sets and store the resulting set in a key.

  • destination

  • key [key ...]

https://redis.io/commands/sunionstore

METHODS - Sorted-set

bzmpop

Remove and return members with scores in a sorted set or block until one is available.

  • timeout

  • numkeys

  • key [key ...]

  • MIN|MAX

  • [COUNT count]

https://redis.io/commands/bzmpop

bzpopmax

Remove and return the member with the highest score from one or more sorted sets, or block until one is available.

  • key [key ...]

  • timeout

https://redis.io/commands/bzpopmax

bzpopmin

Remove and return the member with the lowest score from one or more sorted sets, or block until one is available.

  • key [key ...]

  • timeout

https://redis.io/commands/bzpopmin

zadd

Add one or more members to a sorted set, or update its score if it already exists.

  • key

  • [NX|XX]

  • [GT|LT]

  • [CH]

  • [INCR]

  • score member [score member ...]

https://redis.io/commands/zadd

zcard

Get the number of members in a sorted set.

  • key

https://redis.io/commands/zcard

zcount

Count the members in a sorted set with scores within the given values.

  • key

  • min

  • max

https://redis.io/commands/zcount

zdiff

Subtract multiple sorted sets.

  • numkeys

  • key [key ...]

  • [WITHSCORES]

https://redis.io/commands/zdiff

zdiffstore

Subtract multiple sorted sets and store the resulting sorted set in a new key.

  • destination

  • numkeys

  • key [key ...]

https://redis.io/commands/zdiffstore

zincrby

Increment the score of a member in a sorted set.

  • key

  • increment

  • member

https://redis.io/commands/zincrby

zinter

Intersect multiple sorted sets.

  • numkeys

  • key [key ...]

  • [WEIGHTS weight [weight ...]]

  • [AGGREGATE SUM|MIN|MAX]

  • [WITHSCORES]

https://redis.io/commands/zinter

zintercard

Intersect multiple sorted sets and return the cardinality of the result.

  • numkeys

  • key [key ...]

  • [LIMIT limit]

https://redis.io/commands/zintercard

zinterstore

Intersect multiple sorted sets and store the resulting sorted set in a new key.

  • destination

  • numkeys

  • key [key ...]

  • [WEIGHTS weight [weight ...]]

  • [AGGREGATE SUM|MIN|MAX]

https://redis.io/commands/zinterstore

zlexcount

Count the number of members in a sorted set between a given lexicographical range.

  • key

  • min

  • max

https://redis.io/commands/zlexcount

zmpop

Remove and return members with scores in a sorted set.

  • numkeys

  • key [key ...]

  • MIN|MAX

  • [COUNT count]

https://redis.io/commands/zmpop

zmscore

Get the score associated with the given members in a sorted set.

  • key

  • member [member ...]

https://redis.io/commands/zmscore

zpopmax

Remove and return members with the highest scores in a sorted set.

  • key

  • [count]

https://redis.io/commands/zpopmax

zpopmin

Remove and return members with the lowest scores in a sorted set.

  • key

  • [count]

https://redis.io/commands/zpopmin

zrandmember

Get one or multiple random elements from a sorted set.

  • key

  • [count [WITHSCORES]]

https://redis.io/commands/zrandmember

zrange

Return a range of members in a sorted set.

  • key

  • min

  • max

  • [BYSCORE|BYLEX]

  • [REV]

  • [LIMIT offset count]

  • [WITHSCORES]

https://redis.io/commands/zrange

zrangebylex

Return a range of members in a sorted set, by lexicographical range.

  • key

  • min

  • max

  • [LIMIT offset count]

https://redis.io/commands/zrangebylex

zrangebyscore

Return a range of members in a sorted set, by score.

  • key

  • min

  • max

  • [WITHSCORES]

  • [LIMIT offset count]

https://redis.io/commands/zrangebyscore

zrangestore

Store a range of members from sorted set into another key.

  • dst

  • src

  • min

  • max

  • [BYSCORE|BYLEX]

  • [REV]

  • [LIMIT offset count]

https://redis.io/commands/zrangestore

zrank

Determine the index of a member in a sorted set.

  • key

  • member

https://redis.io/commands/zrank

zrem

Remove one or more members from a sorted set.

  • key

  • member [member ...]

https://redis.io/commands/zrem

zremrangebylex

Remove all members in a sorted set between the given lexicographical range.

  • key

  • min

  • max

https://redis.io/commands/zremrangebylex

zremrangebyrank

Remove all members in a sorted set within the given indexes.

  • key

  • start

  • stop

https://redis.io/commands/zremrangebyrank

zremrangebyscore

Remove all members in a sorted set within the given scores.

  • key

  • min

  • max

https://redis.io/commands/zremrangebyscore

zrevrange

Return a range of members in a sorted set, by index, with scores ordered from high to low.

  • key

  • start

  • stop

  • [WITHSCORES]

https://redis.io/commands/zrevrange

zrevrangebylex

Return a range of members in a sorted set, by lexicographical range, ordered from higher to lower strings.

  • key

  • max

  • min

  • [LIMIT offset count]

https://redis.io/commands/zrevrangebylex

zrevrangebyscore

Return a range of members in a sorted set, by score, with scores ordered from high to low.

  • key

  • max

  • min

  • [WITHSCORES]

  • [LIMIT offset count]

https://redis.io/commands/zrevrangebyscore

zrevrank

Determine the index of a member in a sorted set, with scores ordered from high to low.

  • key

  • member

https://redis.io/commands/zrevrank

zscan

Incrementally iterate sorted sets elements and associated scores.

  • key

  • cursor

  • [MATCH pattern]

  • [COUNT count]

https://redis.io/commands/zscan

zscore

Get the score associated with the given member in a sorted set.

  • key

  • member

https://redis.io/commands/zscore

zunion

Add multiple sorted sets.

  • numkeys

  • key [key ...]

  • [WEIGHTS weight [weight ...]]

  • [AGGREGATE SUM|MIN|MAX]

  • [WITHSCORES]

https://redis.io/commands/zunion

zunionstore

Add multiple sorted sets and store the resulting sorted set in a new key.

  • destination

  • numkeys

  • key [key ...]

  • [WEIGHTS weight [weight ...]]

  • [AGGREGATE SUM|MIN|MAX]

https://redis.io/commands/zunionstore

METHODS - Stream

xack

Marks a pending message as correctly processed, effectively removing it from the pending entries list of the consumer group. Return value of the command is the number of messages successfully acknowledged, that is, the IDs we were actually able to resolve in the PEL.

  • key

  • group

  • id [id ...]

https://redis.io/commands/xack

xadd

Appends a new entry to a stream.

  • key

  • [NOMKSTREAM]

  • [MAXLEN|MINID [=|~] threshold [LIMIT count]]

  • *|id

  • field value [field value ...]

https://redis.io/commands/xadd

xautoclaim

Changes (or acquires) ownership of messages in a consumer group, as if the messages were delivered to the specified consumer.

  • key

  • group

  • consumer

  • min-idle-time

  • start

  • [COUNT count]

  • [JUSTID]

https://redis.io/commands/xautoclaim

xclaim

Changes (or acquires) ownership of a message in a consumer group, as if the message was delivered to the specified consumer.

  • key

  • group

  • consumer

  • min-idle-time

  • id [id ...]

  • [IDLE ms]

  • [TIME unix-time-milliseconds]

  • [RETRYCOUNT count]

  • [FORCE]

  • [JUSTID]

https://redis.io/commands/xclaim

xdel

Removes the specified entries from the stream. Returns the number of items actually deleted, that may be different from the number of IDs passed in case certain IDs do not exist.

  • key

  • id [id ...]

https://redis.io/commands/xdel

xgroup_create

Create a consumer group.

  • key

  • groupname

  • id|$

  • [MKSTREAM]

  • [ENTRIESREAD entries_read]

https://redis.io/commands/xgroup-create

xgroup_createconsumer

Create a consumer in a consumer group.

  • key

  • groupname

  • consumername

https://redis.io/commands/xgroup-createconsumer

xgroup_delconsumer

Delete a consumer from a consumer group.

  • key

  • groupname

  • consumername

https://redis.io/commands/xgroup-delconsumer

xgroup_destroy

Destroy a consumer group.

  • key

  • groupname

https://redis.io/commands/xgroup-destroy

xgroup_setid

Set a consumer group to an arbitrary last delivered ID value.

  • key

  • groupname

  • id|$

  • [ENTRIESREAD entries_read]

https://redis.io/commands/xgroup-setid

xinfo_consumers

List the consumers in a consumer group.

  • key

  • groupname

https://redis.io/commands/xinfo-consumers

xinfo_groups

List the consumer groups of a stream.

  • key

https://redis.io/commands/xinfo-groups

xinfo_stream

Get information about a stream.

  • key

  • [FULL [COUNT count]]

https://redis.io/commands/xinfo-stream

xlen

Return the number of entries in a stream.

  • key

https://redis.io/commands/xlen

xpending

Return information and entries from a stream consumer group pending entries list, that are messages fetched but never acknowledged.

  • key

  • group

  • [[IDLE min-idle-time] start end count [consumer]]

https://redis.io/commands/xpending

xrange

Return a range of elements in a stream, with IDs matching the specified IDs interval.

  • key

  • start

  • end

  • [COUNT count]

https://redis.io/commands/xrange

xread

Return never seen elements in multiple streams, with IDs greater than the ones reported by the caller for each stream. Can block.

  • [COUNT count]

  • [BLOCK milliseconds]

  • STREAMS key [key ...] id [id ...]

https://redis.io/commands/xread

xreadgroup

Return new entries from a stream using a consumer group, or access the history of the pending entries for a given consumer. Can block.

  • GROUP group consumer

  • [COUNT count]

  • [BLOCK milliseconds]

  • [NOACK]

  • STREAMS key [key ...] id [id ...]

https://redis.io/commands/xreadgroup

xrevrange

Return a range of elements in a stream, with IDs matching the specified IDs interval, in reverse order (from greater to smaller IDs) compared to XRANGE.

  • key

  • end

  • start

  • [COUNT count]

https://redis.io/commands/xrevrange

xsetid

An internal command for replicating stream values.

  • key

  • last-id

  • [ENTRIESADDED entries_added]

  • [MAXDELETEDID max_deleted_entry_id]

https://redis.io/commands/xsetid

xtrim

Trims the stream to (approximately if '~' is passed) a certain size.

  • key

  • MAXLEN|MINID [=|~] threshold [LIMIT count]

https://redis.io/commands/xtrim

METHODS - String

append

Append a value to a key.

  • key

  • value

https://redis.io/commands/append

decr

Decrement the integer value of a key by one.

  • key

https://redis.io/commands/decr

decrby

Decrement the integer value of a key by the given number.

  • key

  • decrement

https://redis.io/commands/decrby

get

Get the value of a key.

  • key

https://redis.io/commands/get

getdel

Get the value of a key and delete the key.

  • key

https://redis.io/commands/getdel

getex

Get the value of a key and optionally set its expiration.

  • key

  • [EX seconds|PX milliseconds|EXAT unix-time-seconds|PXAT unix-time-milliseconds|PERSIST]

https://redis.io/commands/getex

getrange

Get a substring of the string stored at a key.

  • key

  • start

  • end

https://redis.io/commands/getrange

getset

Set the string value of a key and return its old value.

  • key

  • value

https://redis.io/commands/getset

incr

Increment the integer value of a key by one.

  • key

https://redis.io/commands/incr

incrby

Increment the integer value of a key by the given amount.

  • key

  • increment

https://redis.io/commands/incrby

incrbyfloat

Increment the float value of a key by the given amount.

  • key

  • increment

https://redis.io/commands/incrbyfloat

lcs

Find longest common substring.

  • key1

  • key2

  • [LEN]

  • [IDX]

  • [MINMATCHLEN len]

  • [WITHMATCHLEN]

https://redis.io/commands/lcs

mget

Get the values of all the given keys.

  • key [key ...]

https://redis.io/commands/mget

mset

Set multiple keys to multiple values.

  • key value [key value ...]

https://redis.io/commands/mset

msetnx

Set multiple keys to multiple values, only if none of the keys exist.

  • key value [key value ...]

https://redis.io/commands/msetnx

psetex

Set the value and expiration in milliseconds of a key.

  • key

  • milliseconds

  • value

https://redis.io/commands/psetex

set

Set the string value of a key.

  • key

  • value

  • [EX seconds|PX milliseconds|EXAT unix-time-seconds|PXAT unix-time-milliseconds|KEEPTTL]

  • [NX|XX]

  • [GET]

https://redis.io/commands/set

setex

Set the value and expiration of a key.

  • key

  • seconds

  • value

https://redis.io/commands/setex

setnx

Set the value of a key, only if the key does not exist.

  • key

  • value

https://redis.io/commands/setnx

setrange

Overwrite part of a string at key starting at the specified offset.

  • key

  • offset

  • value

https://redis.io/commands/setrange

strlen

Get the length of the value stored in a key.

  • key

https://redis.io/commands/strlen

substr

Get a substring of the string stored at a key.

  • key

  • start

  • end

https://redis.io/commands/substr

METHODS - Transactions

discard

Discard all commands issued after MULTI.

https://redis.io/commands/discard

exec

Execute all commands issued after MULTI.

https://redis.io/commands/exec

multi

Mark the start of a transaction block.

https://redis.io/commands/multi

unwatch

Forget about all watched keys.

https://redis.io/commands/unwatch

watch

Watch the given keys to determine execution of the MULTI/EXEC block.

  • key [key ...]

https://redis.io/commands/watch

METHODS - Legacy

These take a subcommand as a parameter and construct the method name by combining the main command with subcommand - for example, ->xgroup(CREATE => ...) would call ->xgroup_create.

acl

client

client_no

cluster

cluster_count

cluster_count_failure

cluster_set

cluster_set_config

config

function

latency

memory

memory_malloc

module

object

pubsub

script

slowlog

xgroup

xinfo

AUTHOR

Tom Molesworth <TEAM@cpan.org>

LICENSE

This was autogenerated from the official Redis documentation, which is published under the Creative Commons Attribution-ShareAlike license.

The Perl code is copyright Tom Molesworth 2015-2021, and licensed under the same terms as Perl itself.