Mode of the connection.
One of "normal"
, "subscriber"
, or "monitor"
. When the connection is
not in "normal"
mode, certain commands are not allowed.
List the ACL categories or the commands inside a category
Remove the specified ACL users and the associated rules
Returns whether the user can execute the given command without executing the command.
Generate a pseudorandom secure password to use for ACL users
Get the rules for a specific ACL user
Show helpful text about the different subcommands
List the current ACL rules in ACL config file format
Reload the ACLs from the configured ACL file
List latest events denied because of ACLs in place
Save the current ACL rules in the configured ACL file
Modify or create the rules for a specific ACL user
List the username of all the configured ACL rules
Return the name of the user associated to the current connection
Create add builtin command
Append a value to a key
Sent by cluster clients after an -ASK redirect
Authenticate to the server
Asynchronously rewrite the append-only file
Asynchronously save the dataset to disk
Count set bits in a string
Perform arbitrary bitfield integer operations on strings
Perform arbitrary bitfield integer operations on strings. Read-only variant of BITFIELD
Perform bitwise operations between strings
Find first bit set or clear in a string
Pop an element from a list, push it to another list and return it; or block until one is available
Pop elements from a list, or block until one is available
Remove and get the first element in a list, or block until one is available
Remove and get the last element in a list, or block until one is available
Remove and return members with scores in a sorted set or block until one is available
Remove and return the member with the highest score from one or more sorted sets, or block until one is available
Remove and return the member with the lowest score from one or more sorted sets, or block until one is available
Call arbitrary commands.
redis.call('set', 'foo', 'bar')
is the same as redis.set('foo', 'bar')
,
so the only case you need to use this method is when the command is not
supported by ioredis.
redis.call('set', 'foo', 'bar');
redis.call('get', 'foo', (err, value) => {
// value === 'bar'
});
Instruct the server about tracking or not keys in the next request
Get the current connection name
Get tracking notifications redirection client ID if any
Show helpful text about the different subcommands
Returns the client ID for the current connection
Returns information about the current client connection.
Kill the connection of a client
Get the list of client connections
Set client eviction mode for the current connection
Stop processing commands from clients for some time
Instruct the server whether to reply to commands
Set the current connection name
Enable or disable server assisted client side caching support
Return information about server assisted client side caching for the current connection
Unblock a client blocked in a blocking command from a different connection
Resume processing of clients that were paused
Assign new hash slots to receiving node
Assign new hash slots to receiving node
Advance the cluster config epoch
Return the number of failure reports active for a given node
Return the number of local keys in the specified hash slot
Set hash slots as unbound in receiving node
Set hash slots as unbound in receiving node
Forces a replica to perform a manual failover of its master.
Delete a node's own slots information
Remove a node from the nodes table
Return local key names in the specified hash slot
Show helpful text about the different subcommands
Provides info about Redis Cluster node state
Returns the hash slot of the specified key
Returns a list of all TCP links to and from peer nodes in cluster
Force a node cluster to handshake with another node
Return the node id
Get Cluster config for the node
List replica nodes of the specified master node
Reconfigure a node as a replica of the specified master node
Reset a Redis Cluster node
Forces the node to save cluster state on disk
Set the configuration epoch in a new node
Bind a hash slot to a specific node
Get array of cluster slots to node mappings
List replica nodes of the specified master node
Get array of Cluster slot to node mappings
Get total number of Redis commands
Get array of specific Redis command documentation
Extract keys given a full Redis command
Extract keys and access flags given a full Redis command
Show helpful text about the different subcommands
Get array of specific Redis command details, or all when no argument is given.
Get an array of Redis command names
Get the values of configuration parameters
Show helpful text about the different subcommands
Reset the stats returned by INFO
Rewrite the configuration file with the in memory configuration
Set configuration parameters to the given values
Create a connection to Redis.
This method will be invoked automatically when creating a new Redis instance
unless lazyConnect: true
is passed.
When calling this method manually, a Promise is returned, which will be resolved when the connection status is ready.
Copy a key
Create a builtin command
Return the number of keys in the selected database
A container for debugging commands
Decrement the integer value of a key by one
Decrement the integer value of a key by the given number
Define a custom command using lua script
Delete a key
Discard all commands issued after MULTI
Disconnect from Redis.
This method closes the connection immediately, and may lose some pending replies that haven't written to client. If you want to wait for the pending replies, use Redis#quit instead.
Return a serialized version of the value stored at the specified key.
Create a new instance with the same options as the current one.
Echo the given string
Disconnect from Redis.
Execute a Lua script server side
Execute a read-only Lua script server side
Execute a Lua script server side
This is the major component of ioredis. Use it to connect to a standalone Redis server or Sentinels.