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.

METHODS - Cluster

cluster_addslots

Assign new hash slots to receiving node.

  • slot [slot ...]

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

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_failover

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

  • [FORCE|TAKEOVER]

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

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

cluster_meet

Force a node cluster to handshake with another node.

  • ip

  • port

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

cluster_nodes

Get Cluster config for the node.

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

cluster_replicate

Reconfigure a node as a slave 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|MIGRATING|STABLE|NODE

  • [node-id]

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

cluster_slaves

List slave 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 slave node.

https://redis.io/commands/readonly

readwrite

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

https://redis.io/commands/readwrite

METHODS - Connection

auth

Authenticate to the server.

  • password

https://redis.io/commands/auth

echo

Echo the given string.

  • message

https://redis.io/commands/echo

ping

Ping the server.

  • [message]

https://redis.io/commands/ping

quit

Close the connection.

https://redis.io/commands/quit

select

Change the selected database for the current connection.

  • index

https://redis.io/commands/select

swapdb

Swaps two Redis databases.

  • index

  • index

https://redis.io/commands/swapdb

METHODS - Generic

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

https://redis.io/commands/expire

expireat

Set the expiration for a key as a UNIX timestamp.

  • key

  • timestamp

https://redis.io/commands/expireat

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]

  • [KEYS key [key ...]]

https://redis.io/commands/migrate

move

Move a key to another database.

  • key

  • db

https://redis.io/commands/move

object

Inspect the internals of Redis objects.

  • subcommand

  • [arguments [arguments ...]]

https://redis.io/commands/object

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

https://redis.io/commands/pexpire

pexpireat

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

  • key

  • milliseconds-timestamp

https://redis.io/commands/pexpireat

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]

https://redis.io/commands/restore

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

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.

  • 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.

  • numslaves

  • timeout

https://redis.io/commands/wait

scan

Incrementally iterate the keys space.

  • cursor

  • [MATCH pattern]

  • [COUNT count]

https://redis.io/commands/scan

METHODS - Geo

geoadd

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

  • key

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

https://redis.io/commands/geoadd

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

geodist

Returns the distance between two members of a geospatial index.

  • key

  • member1

  • member2

  • [unit]

https://redis.io/commands/geodist

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]

  • [ASC|DESC]

  • [STORE key]

  • [STOREDIST key]

https://redis.io/commands/georadius

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]

  • [ASC|DESC]

  • [STORE key]

  • [STOREDIST key]

https://redis.io/commands/georadiusbymember

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

hset

Set the string value of a hash field.

  • key

  • 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

hscan

Incrementally iterate hash fields and associated values.

  • key

  • cursor

  • [MATCH pattern]

  • [COUNT count]

https://redis.io/commands/hscan

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

pfmerge

Merge N different HyperLogLogs into a single one.

  • destkey

  • sourcekey [sourcekey ...]

https://redis.io/commands/pfmerge

METHODS - List

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 a value 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

  • value

https://redis.io/commands/linsert

llen

Get the length of a list.

  • key

https://redis.io/commands/llen

lpop

Remove and get the first element in a list.

  • key

https://redis.io/commands/lpop

lpush

Prepend one or multiple values to a list.

  • key

  • value [value ...]

https://redis.io/commands/lpush

lpushx

Prepend a value to a list, only if the list exists.

  • key

  • value

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

  • value

https://redis.io/commands/lrem

lset

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

  • key

  • index

  • value

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 element in a list.

  • key

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 values to a list.

  • key

  • value [value ...]

https://redis.io/commands/rpush

rpushx

Append a value to a list, only if the list exists.

  • key

  • value

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

pubsub

Inspect the state of the Pub/Sub subsystem.

  • subcommand

  • [argument [argument ...]]

https://redis.io/commands/pubsub

publish

Post a message to a channel.

  • channel

  • message

https://redis.io/commands/publish

punsubscribe

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

  • [pattern [pattern ...]]

https://redis.io/commands/punsubscribe

subscribe

Listen for messages published to the given channels.

  • channel [channel ...]

https://redis.io/commands/subscribe

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

evalsha

Execute a Lua script server side.

  • sha1

  • numkeys

  • key [key ...]

  • arg [arg ...]

https://redis.io/commands/evalsha

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.

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

bgrewriteaof

Asynchronously rewrite the append-only file.

https://redis.io/commands/bgrewriteaof

bgsave

Asynchronously save the dataset to disk.

https://redis.io/commands/bgsave

client_kill

Kill the connection of a client.

  • [ip:port]

  • [ID client-id]

  • [TYPE normal|master|slave|pubsub]

  • [ADDR ip:port]

  • [SKIPME yes/no]

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

client_list

Get the list of client connections.

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

client_getname

Get the current connection name.

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

client_pause

Stop processing commands from clients for some time.

  • timeout

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

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_getkeys

Extract keys given a full Redis command.

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

command_info

Get array of specific Redis command details.

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

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

config_get

Get the value of a configuration parameter.

  • parameter

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

config_rewrite

Rewrite the configuration file with the in memory configuration.

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

config_set

Set a configuration parameter to the given value.

  • parameter

  • value

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

config_resetstat

Reset the stats returned by INFO.

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

dbsize

Return the number of keys in the selected database.

https://redis.io/commands/dbsize

debug_object

Get debugging information about a key.

  • key

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

debug_segfault

Make the server crash.

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

flushall

Remove all keys from all databases.

  • [ASYNC]

https://redis.io/commands/flushall

flushdb

Remove all keys from the current database.

  • [ASYNC]

https://redis.io/commands/flushdb

info

Get information and statistics about the server.

  • [section]

https://redis.io/commands/info

lastsave

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

https://redis.io/commands/lastsave

monitor

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

https://redis.io/commands/monitor

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]

https://redis.io/commands/shutdown

slaveof

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

  • host

  • port

https://redis.io/commands/slaveof

slowlog

Manages the Redis slow queries log.

  • subcommand

  • [argument]

https://redis.io/commands/slowlog

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

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

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

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

sscan

Incrementally iterate Set elements.

  • key

  • cursor

  • [MATCH pattern]

  • [COUNT count]

https://redis.io/commands/sscan

METHODS - Sorted_set

zadd

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

  • key

  • [NX|XX]

  • [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

zincrby

Increment the score of a member in a sorted set.

  • key

  • increment

  • member

https://redis.io/commands/zincrby

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

zrange

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

  • key

  • start

  • stop

  • [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

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

zrangebyscore

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

  • key

  • min

  • max

  • [WITHSCORES]

  • [LIMIT offset count]

https://redis.io/commands/zrangebyscore

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

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

zscore

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

  • key

  • member

https://redis.io/commands/zscore

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

zscan

Incrementally iterate sorted sets elements and associated scores.

  • key

  • cursor

  • [MATCH pattern]

  • [COUNT count]

https://redis.io/commands/zscan

METHODS - String

append

Append a value to a key.

  • key

  • value

https://redis.io/commands/append

bitcount

Count set bits in a string.

  • key

  • [start end]

https://redis.io/commands/bitcount

bitfield

Perform arbitrary bitfield integer operations on strings.

  • key

  • [GET type offset]

  • [SET type offset value]

  • [INCRBY type offset increment]

  • [OVERFLOW WRAP|SAT|FAIL]

https://redis.io/commands/bitfield

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]

https://redis.io/commands/bitpos

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

getbit

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

  • key

  • offset

https://redis.io/commands/getbit

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

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]

  • [NX|XX]

https://redis.io/commands/set

setbit

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

  • key

  • offset

  • value

https://redis.io/commands/setbit

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

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

AUTHOR

Tom Molesworth <TEAM@cpan.org>

LICENSE

Copyright Tom Molesworth 2015-2017. Licensed under the same terms as Perl itself.