StackExchange.Redis Describes a GeoEntry element with the corresponding value. GeoEntries are stored in redis as SortedSetEntries. The name of the GeoEntry. Describes the longitude and latitude of a GeoEntry. Initializes a GeoEntry value. The longitude position to use. The latitude position to use. The value to store for this position. The longitude of the GeoEntry. The latitude of the GeoEntry. A "({Longitude},{Latitude})={Member}" string representation of this entry. Compares two values for equality. The to compare to. Compares two values for equality. The to compare to. Compares two values for equality. The first entry to compare. The second entry to compare. Compares two values for non-equality. The first entry to compare. The second entry to compare. Describes the longitude and latitude of a GeoEntry. The Latitude of the GeoPosition. The Longitude of the GeoPosition. Creates a new GeoPosition. A "{long} {lat}" string representation of this position. See . Diagonals not an issue in the case of lat/long. Diagonals are not an issue in the case of lat/long. Compares two values for equality. The to compare to. Compares two values for equality. The to compare to. Compares two values for equality. The first position to compare. The second position to compare. Compares two values for non-equality. The first position to compare. The second position to compare. GeoRadius command options. No Options. Redis will return the coordinates of any results. Redis will return the distance from center for all results. Redis will return the geo hash value as an integer. (This is the score in the sorted set). Populates the commonly used values from the entry (the integer hash is not returned as it is not commonly useful). The result of a GeoRadius command. Indicate the member being represented. The matched member. The distance of the matched member from the center of the geo radius command. The hash value of the matched member as an integer. (The key in the sorted set). Note that this is not the same as the hash returned from GeoHash The coordinates of the matched member. Returns a new GeoRadiusResult. The value from the result. The distance from the result. The hash of the result. The GeoPosition of the result. A Shape that you can use for a GeoSearch The unit to use for creating the shape. The number of shape arguments. constructs a A circle drawn on a map bounding Creates a Shape. The radius of the circle. The distance unit the circle will use, defaults to Meters. Gets the s for this shape A box drawn on a map Initializes a GeoBox. The height of the box. The width of the box. The distance unit the box will use, defaults to Meters. Describes a hash-field (a name/value pair). Initializes a value. The name for this hash entry. The value for this hash entry. The name of the hash field. The value of the hash field. The name of the hash field. Converts to a key/value pair. The to create a from. Converts from a key/value pair. The to get a from. A "{name}: {value}" string representation of this entry. Compares two values for equality. The to compare to. Compares two values for equality. The to compare to. Compares two values for equality. The first to compare. The second to compare. Compares two values for non-equality. The first to compare. The second to compare. A latency entry as reported by the built-in LATENCY HISTORY command The time at which this entry was recorded The latency recorded for this event A latency entry as reported by the built-in LATENCY LATEST command The name of this event The time at which this entry was recorded The latency recorded for this event The max latency recorded for all events The result of a LongestCommonSubsequence command with IDX feature. Returns a list of the positions of each sub-match. Whether this match result contains any matches. The matched positions of all the sub-matched strings. The length of the longest match. Returns a new . The matched positions in each string. The length of the match. Represents a sub-match of the longest match. i.e first indexes the matched substring in each string. The first index of the matched substring in the first string. The first index of the matched substring in the second string. The length of the match. Returns a new Match. The first index of the matched substring in the first string. The first index of the matched substring in the second string. The length of the match. A contiguous portion of a redis list. A null ListPopResult, indicating no results. Whether this object is null/empty. The key of the list that this set of entries came form. The values from the list. Describes a value contained in a stream (a name/value pair). Initializes a value. The name for this entry. The value for this entry. The name of the field. The value of the field. Converts to a key/value pair. The to create a from. Converts from a key/value pair. The to get a from. The "{name}: {value}" string representation. Compares two values for equality. The to compare to. Compares two values for equality. The to compare to. Compares two values for equality. The first to compare. The second to compare. Compares two values for non-equality. The first to compare. The second to compare. Describes a Redis Stream with an associated array of entries. The key for the stream. An array of entries contained within the stream. Describes a value/expiry pair. Creates a from a and a . The expiry of this record. The value of this record. Describes a sorted-set element with the corresponding value. Initializes a value. The to get an entry for. The redis score for . The unique element stored in the sorted set. The score against the element. The score against the element. The unique element stored in the sorted set. Converts to a key/value pair. The to get a for. Converts from a key/value pair. The to get a for. A "{element}: {score}" string representation of the entry. Compares two values for equality. The to compare to. Compares two values for equality. The to compare to. Compares two values by score. The to compare to. Compares two values by score. The to compare to. Compares two values for equality. The first to compare. The second to compare. Compares two values for non-equality. The first to compare. The second to compare. A contiguous portion of a redis sorted set. A null SortedSetPopResult, indicating no results. Whether this object is null/empty. The key of the sorted set these entries came form. The provided entries of the sorted set. Result of the XAUTOCLAIM command with the JUSTID option. A null , indicating no results. Whether this object is null/empty. The stream ID to be used in the next call to StreamAutoClaim. Array of IDs claimed by the command. Array of message IDs deleted from the stream. Result of the XAUTOCLAIM command. A null , indicating no results. Whether this object is null/empty. The stream ID to be used in the next call to StreamAutoClaim. An array of for the successfully claimed entries. An array of message IDs deleted from the stream. Describes a consumer off a Redis Stream. The name of the consumer. The number of messages that have been delivered by not yet acknowledged by the consumer. Describes a consumer within a consumer group, retrieved using the XINFO CONSUMERS command. . The name of the consumer. The number of pending messages for the consumer. A pending message is one that has been received by the consumer but not yet acknowledged. The idle time, if any, for the consumer. Describes an entry contained in a Redis Stream. Creates an stream entry. A null stream entry. The ID assigned to the message. The values contained within the message. Search for a specific field by name, returning the value. Indicates that the Redis Stream Entry is null. Describes a consumer group retrieved using the XINFO GROUPS command. . The name of the consumer group. The number of consumers within the consumer group. The total number of pending messages for the consumer group. A pending message is one that has been received by a consumer but not yet acknowledged. The Id of the last message delivered to the group. Total number of entries the group had read. The number of entries in the range between the group's read entries and the stream's entries. Describes stream information retrieved using the XINFO STREAM command. . The number of entries in the stream. The number of radix tree keys in the stream. The number of radix tree nodes in the stream. The number of consumers groups in the stream. The first entry in the stream. The last entry in the stream. The last generated id. Describes basic information about pending messages for a consumer group. The number of pending messages. A pending message is a message that has been consumed but not yet acknowledged. The lowest message ID in the set of pending messages. The highest message ID in the set of pending messages. An array of consumers within the consumer group that have pending messages. Describes properties of a pending message. A pending message is one that has been received by a consumer but has not yet been acknowledged. The ID of the pending message. The consumer that received the pending message. The time that has passed since the message was last delivered to a consumer. The number of times the message has been delivered to a consumer. Describes a pair consisting of the Stream Key and the from which to begin reading a stream. Read from the beginning of a stream. Read new messages. Initializes a value. The key for the stream. The position from which to begin reading the stream. The stream key. The offset at which to begin reading the stream. The backlog policy to use for commands. This policy comes into effect when a connection is unhealthy or unavailable. The policy can choose to backlog commands and wait to try them (within their timeout) against a connection when it comes up, or it could choose to fail fast and throw ASAP. Different apps desire different behaviors with backpressure and how to handle large amounts of load, so this is configurable to optimize the happy path but avoid spiral-of-death queue scenarios for others. Backlog behavior matching StackExchange.Redis's 2.x line, failing fast and not attempting to queue and retry when a connection is available again. Default backlog policy which will allow commands to be issues against an endpoint and queue up. Commands are still subject to their async timeout (which serves as a queue size check). Whether to queue commands while disconnected. True means queue for attempts up until their timeout. means to fail ASAP and queue nothing. Whether to immediately abandon (with an exception) all pending commands when a connection goes unhealthy. Note that in results other than success, no guarantees are made about final state; if you care: snapshot Represents a message that is broadcast via publish/subscribe. The Channel:Message string representation. The channel that the subscription was created from. The channel that the message was broadcast to. The value that was broadcast. Checks if 2 messages are .Equal() Checks if 2 messages are not .Equal() Represents a message queue of ordered pub/sub notifications. To create a ChannelMessageQueue, use or . The Channel that was subscribed for this queue. The string representation of this channel. An awaitable task the indicates completion of the queue (including drain of data). Consume a message from the channel. The to use. Attempt to synchronously consume a message from the channel. The read from the Channel. Attempt to query the backlog length of the queue. The (approximate) count of items in the Channel. Create a message loop that processes messages sequentially. The handler to run when receiving a message. Create a message loop that processes messages sequentially. The handler to execute when receiving a message. Stop receiving messages on this channel. The flags to use when unsubscribing. Stop receiving messages on this channel. The flags to use when unsubscribing. Represents the state of an individual client connection to redis. Address (host and port) of the client. Total duration of the connection in seconds. Current database ID. The flags associated with this connection. The client flags can be a combination of: A Connection to be closed ASAP. b The client is waiting in a blocking operation. c Connection to be closed after writing entire reply. d A watched keys has been modified - EXEC will fail. i The client is waiting for a VM I/O (deprecated). M The client is a primary. N No specific flag set. O The client is a replica in MONITOR mode. P The client is a Pub/Sub subscriber. r The client is in readonly mode against a cluster node. S The client is a normal replica server. u The client is unblocked. U The client is unblocked. x The client is in a MULTI/EXEC context. t The client enabled keys tracking in order to perform client side caching. R The client tracking target client is invalid. B The client enabled broadcast tracking mode. The host of the client (typically an IP address). Idle time of the connection in seconds. Last command played. The name allocated to this connection, if any. Number of pattern matching subscriptions. The port of the client. The raw content from redis. Number of channel subscriptions. Number of commands in a MULTI/EXEC context. A unique 64-bit client ID (introduced in Redis 2.8.12). Format the object as a string. The class of the connection. Client RESP protocol version. Added in Redis 7.0. Client RESP protocol version. Added in Redis 7.0. Client library name. Added in Redis 7.2. Client library version. Added in Redis 7.2. Indicates a range of slots served by a cluster node. Create a new SlotRange value. The slot ID to start at. The slot ID to end at. The start of the range (inclusive). The end of the range (inclusive). Indicates whether two ranges are not equal. The first slot range. The second slot range. Indicates whether two ranges are equal. The first slot range. The second slot range. Try to parse a string as a range. The range string to parse, e.g."1-12". The parsed , if successful. Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object. The other slot range to compare to. See . The other slot range to compare to. Indicates whether two ranges are equal. The other slot range to compare to. String representation ("{from}-{to}") of the range. Describes the state of the cluster as reported by a single node. Gets all nodes contained in the configuration. The node that was asked for the configuration. Obtain the node relating to a specified endpoint. The endpoint to get a cluster node from. Gets the node that serves the specified slot. The slot ID to get a node by. Gets the node that serves the specified key's slot. The key to identify a node by. Represents the configuration of a single node in a cluster configuration. Gets all child nodes of the current node. Gets the endpoint of the current node. Gets whether this node is in a failed state. Gets whether this node is possibly in a failed state. Possibly here means the node we're getting status from can't communicate with it, but doesn't mean it's down for sure. Gets whether this is the node which responded to the CLUSTER NODES request. Gets whether this node is a replica. Gets whether this node is a replica. Gets whether this node is flagged as noaddr. Gets the node's connection status. Gets the unique node-id of the current node. Gets the parent node of the current node. Gets the unique node-id of the parent of the current node. The configuration as reported by the server. The slots owned by this server. Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object. The to compare to. See . The to compare to. Indicates whether two instances are equivalent. The to compare to. A string summary of this cluster configuration. Represents the commands mapped on a particular configuration. The default commands specified by redis. The commands available to twemproxy. The commands available to envoyproxy. The commands available to SSDB. The commands available to Sentinel. Create a new , customizing some commands. The commands to override. Creates a by specifying which commands are available or unavailable. The commands to specify. Whether the commands are available or excluded. See . Represents the information known about long-running commands. The array composing the arguments of the command. The amount of time needed for its execution. The time at which the logged command was processed. A unique progressive identifier for every slow log entry. The entry's unique ID can be used in order to avoid processing slow log entries multiple times (for instance you may have a script sending you an email alert for every new slow log entry). The ID is never reset in the course of the Redis server execution, only a server restart will reset it. Deduces a link to the redis documentation about the specified command Describes a precondition used in a redis transaction. Enforces that the given hash-field must have the specified value. The key of the hash to check. The field in the hash to check. The value that the hash field must match. Enforces that the given hash-field must exist. The key of the hash to check. The field in the hash to check. Enforces that the given hash-field must not have the specified value. The key of the hash to check. The field in the hash to check. The value that the hash field must not match. Enforces that the given hash-field must not exist. The key of the hash to check. The field in the hash that must not exist. Enforces that the given key must exist. The key that must exist. Enforces that the given key must not exist. The key that must not exist. Enforces that the given list index must have the specified value. The key of the list to check. The position in the list to check. The value of the list position that must match. Enforces that the given list index must exist. The key of the list to check. The position in the list that must exist. Enforces that the given list index must not have the specified value. The key of the list to check. The position in the list to check. The value of the list position must not match. Enforces that the given list index must not exist. The key of the list to check. The position in the list that must not exist. Enforces that the given key must have the specified value. The key to check. The value that must match. Enforces that the given key must not have the specified value. The key to check. The value that must not match. Enforces that the given hash length is a certain value. The key of the hash to check. The length the hash must have. Enforces that the given hash length is less than a certain value. The key of the hash to check. The length the hash must be less than. Enforces that the given hash length is greater than a certain value. The key of the hash to check. The length the hash must be greater than. Enforces that the given string length is a certain value. The key of the string to check. The length the string must be equal to. Enforces that the given string length is less than a certain value. The key of the string to check. The length the string must be less than. Enforces that the given string length is greater than a certain value. The key of the string to check. The length the string must be greater than. Enforces that the given list length is a certain value. The key of the list to check. The length the list must be equal to. Enforces that the given list length is less than a certain value. The key of the list to check. The length the list must be less than. Enforces that the given list length is greater than a certain value. The key of the list to check. The length the list must be greater than. Enforces that the given set cardinality is a certain value. The key of the set to check. The length the set must be equal to. Enforces that the given set cardinality is less than a certain value. The key of the set to check. The length the set must be less than. Enforces that the given set cardinality is greater than a certain value. The key of the set to check. The length the set must be greater than. Enforces that the given set contains a certain member. The key of the set to check. The member the set must contain. Enforces that the given set does not contain a certain member. The key of the set to check. The member the set must not contain. Enforces that the given sorted set cardinality is a certain value. The key of the sorted set to check. The length the sorted set must be equal to. Enforces that the given sorted set contains a certain number of members with scores in the given range. The key of the sorted set to check. The length the sorted set must be equal to. Minimum inclusive score. Maximum inclusive score. Enforces that the given sorted set cardinality is less than a certain value. The key of the sorted set to check. The length the sorted set must be less than. Enforces that the given sorted set contains less than a certain number of members with scores in the given range. The key of the sorted set to check. The length the sorted set must be equal to. Minimum inclusive score. Maximum inclusive score. Enforces that the given sorted set cardinality is greater than a certain value. The key of the sorted set to check. The length the sorted set must be greater than. Enforces that the given sorted set contains more than a certain number of members with scores in the given range. The key of the sorted set to check. The length the sorted set must be equal to. Minimum inclusive score. Maximum inclusive score. Enforces that the given sorted set contains a certain member. The key of the sorted set to check. The member the sorted set must contain. Enforces that the given sorted set does not contain a certain member. The key of the sorted set to check. The member the sorted set must not contain. Enforces that the given sorted set member must have the specified score. The key of the sorted set to check. The member the sorted set to check. The score that member must have. Enforces that the given sorted set member must not have the specified score. The key of the sorted set to check. The member the sorted set to check. The score that member must not have. Enforces that the given sorted set must have the given score. The key of the sorted set to check. The score that the sorted set must have. Enforces that the given sorted set must not have the given score. The key of the sorted set to check. The score that the sorted set must not have. Enforces that the given sorted set must have the specified count of the given score. The key of the sorted set to check. The score that the sorted set must have. The number of members which sorted set must have. Enforces that the given sorted set must not have the specified count of the given score. The key of the sorted set to check. The score that the sorted set must not have. The number of members which sorted set must not have. Enforces that the given stream length is a certain value. The key of the stream to check. The length the stream must have. Enforces that the given stream length is less than a certain value. The key of the stream to check. The length the stream must be less than. Enforces that the given stream length is greater than a certain value. The key of the stream to check. The length the stream must be greater than. Indicates the status of a condition as part of a transaction. Indicates whether the condition was satisfied. The options relevant to a set of redis connections. Some options are not observed by a after initial creation: A LocalCertificateSelectionCallback delegate responsible for selecting the certificate used for authentication; note that this cannot be specified in the configuration-string. A RemoteCertificateValidationCallback delegate responsible for validating the certificate supplied by the remote party; note that this cannot be specified in the configuration-string. The default (not explicitly configured) options for this connection, fetched based on our parsed endpoints. Allows modification of a between creation and connection. Passed in is the endpoint we're connecting to, which type of connection it is, and the socket itself. For example, a specific local IP endpoint could be bound, linger time altered, etc. Gets or sets whether connect/configuration timeouts should be explicitly notified via a TimeoutException. Indicates whether admin operations should be allowed. Specifies the time in milliseconds that the system should allow for asynchronous operations (defaults to SyncTimeout). Indicates whether the connection should be encrypted Gets or sets whether the library should identify itself by library-name/version when possible. Gets or sets the library name to use for CLIENT SETINFO lib-name calls to Redis during handshake. Defaults to "SE.Redis". If the value is null, empty or whitespace, then the value from the options-provideer is used; to disable the library name feature, use instead. Automatically encodes and decodes channels. A Boolean value that specifies whether the certificate revocation list is checked during authentication. Create a certificate validation check that checks against the supplied issuer even if not known by the machine. The file system path to find the certificate at. Create a certificate validation check that checks against the supplied issuer even if not known by the machine. The issuer to trust. The client name to use for all connections. The number of times to repeat the initial connect cycle if no servers respond promptly. The command-map associated with this configuration. This is memoized when a connects. Modifying it afterwards will have no effect on already-created multiplexers. Gets the command map for a given server type, since some supersede settings when connecting. Channel to use for broadcasting and listening for configuration change notification. This is memoized when a connects. Modifying it afterwards will have no effect on already-created multiplexers. Specifies the time in milliseconds that should be allowed for connection (defaults to 5 seconds unless SyncTimeout is higher). Specifies the default database to be used when calling without any parameters. The server version to assume. The endpoints defined for this configuration. This is memoized when a connects. Modifying it afterwards will have no effect on already-created multiplexers. Controls how often the connection heartbeats. A heartbeat includes: - Evaluating if any messages have timed out - Evaluating connection status (checking for failures) - Sending a server message to keep the connection alive if needed This defaults to 1000 milliseconds and should not be changed for most use cases. If for example you want to evaluate whether commands have violated the at a lower fidelity than 1000 milliseconds, you could lower this value. Be aware setting this very low incurs additional overhead of evaluating the above more often. Use ThreadPriority.AboveNormal for SocketManager reader and writer threads (true by default). If , will be used. Should exceptions include identifiable details? (key names, additional .Data annotations) Should exceptions include performance counter details? CPU usage, etc - note that this can be problematic on some platforms. Specifies the time in seconds at which connections should be pinged to ensure validity. -1 Defaults to 60 Seconds The to get loggers for connection events. Note: changes here only affect s created after. The username to use to authenticate with the server. The password to use to authenticate with the server. Specifies whether asynchronous operations should be invoked in a way that guarantees their original delivery order. Type of proxy to use (if any); for example . The retry policy to be used for connection reconnects. The backlog policy to be used for commands when a connection is unhealthy. Indicates whether endpoints should be resolved via DNS before connecting. If enabled the ConnectionMultiplexer will not re-resolve DNS when attempting to re-connect after a connection failure. Specifies the time in milliseconds that the system should allow for responses before concluding that the socket is unhealthy. The service name used to resolve a service via sentinel. Gets or sets the SocketManager instance to be used with these options. If this is null a shared cross-multiplexer is used. This is only used when a is created. Modifying it afterwards will have no effect on already-created multiplexers. Indicates whether the connection should be encrypted. The target-host to use when validating SSL certificate; setting a value here enables SSL mode. Configures which SSL/TLS protocols should be allowed. If not set, defaults are chosen by the .NET framework. Specifies the time in milliseconds that the system should allow for synchronous operations (defaults to 5 seconds). Tie-breaker used to choose between primaries (must match the endpoint exactly). The size of the output buffer to use. Check configuration every n seconds (every minute by default). Parse the configuration from a comma-delimited configuration string. The configuration string to parse. is . is empty. Parse the configuration from a comma-delimited configuration string. The configuration string to parse. Whether to ignore unknown elements in . is . is empty. Create a copy of the configuration. Apply settings to configure this instance of , e.g. for a specific scenario. An action that will update the properties of this instance. This instance, with any changes made. Resolve the default port for any endpoints that did not have a port explicitly specified. Gets a tie breaker if we both have one set, and should be using one. Returns the effective configuration string for this configuration, including Redis credentials. Includes password to allow generation of configuration strings used for connecting multiplexer. Returns the effective configuration string for this configuration with the option to include or exclude the password from the string. Whether to include the password. Allows custom transport implementations, such as http-tunneling via a proxy. Specify the redis protocol type Options provider for Azure environments. Allow connecting after startup, in the cases where remote cache isn't ready or is overloaded. The minimum version of Redis in Azure is 4, so use the widest set of available commands when connecting. List of domains known to be Azure Redis, so we can light up some helpful functionality for minimizing downtime during maintenance events and such. A defaults providers for . This providers defaults not explicitly specified and is present to be inherited by environments that want to provide better defaults for their use case, e.g. in a single wrapper library used many places. Why not just have a default instance? Good question! Since we null coalesce down to the defaults, there's an inherent pit-of-failure with that approach of . If you forget anything or if someone creates a provider nulling these out...kaboom. The known providers to match against (built into the library) - the default set. If none of these match, is used. The current list of providers to match (potentially modified from defaults via . Adds a provider to match endpoints against. The last provider added has the highest priority. If you want your provider to match everything, implement as return true;. The provider to add. Whether this options provider matches a given endpoint, for automatically selecting a provider based on what's being connected to. Gets a provider for the given endpoints, falling back to if nothing more specific is found. Gets a provider for a given endpoints, falling back to if nothing more specific is found. Gets or sets whether connect/configuration timeouts should be explicitly notified via a TimeoutException. Indicates whether admin operations should be allowed. The backlog policy to be used for commands when a connection is unhealthy. A Boolean value that specifies whether the certificate revocation list is checked during authentication. The number of times to repeat the initial connect cycle if no servers respond promptly. Specifies the time that should be allowed for connection. Falls back to Max(5000, SyncTimeout) if null. The command-map associated with this configuration. Channel to use for broadcasting and listening for configuration change notification. The server version to assume. Controls how often the connection heartbeats. A heartbeat includes: - Evaluating if any messages have timed out - Evaluating connection status (checking for failures) - Sending a server message to keep the connection alive if needed Be aware setting this very low incurs additional overhead of evaluating the above more often. Should exceptions include identifiable details? (key names, additional .Data annotations) Should exceptions include performance counter details? CPU usage, etc - note that this can be problematic on some platforms. Specifies the time interval at which connections should be pinged to ensure validity. The to get loggers for connection events. Note: changes here only affect s created after. Type of proxy to use (if any); for example . The retry policy to be used for connection reconnects. Indicates whether endpoints should be resolved via DNS before connecting. If enabled the ConnectionMultiplexer will not re-resolve DNS when attempting to re-connect after a connection failure. Specifies the time that the system should allow for synchronous operations. Tie-breaker used to choose between primaries (must match the endpoint exactly). Check configuration every n interval. The username to use to authenticate with the server. The password to use to authenticate with the server. The default client name for a connection, with the library version appended. Gets the default client name for a connection. Gets the library name to use for CLIENT SETINFO lib-name calls to Redis during handshake. Defaults to "SE.Redis". String version of the StackExchange.Redis library, for use in any options. Name of the machine we're running on, for use in any options. Whether to identify the client by library name/version when possible Tries to get the RoleInstance Id if Microsoft.WindowsAzure.ServiceRuntime is loaded. In case of any failure, swallows the exception and returns null. Azure, in the default provider? Yes, to maintain existing compatibility/convenience. Source != destination here. The action to perform, if any, immediately after an initial connection completes. The multiplexer that just connected. The logger for the connection, to emit to the connection output log. Gets the default SSL "enabled or not" based on a set of endpoints. Note: this setting then applies for *all* endpoints. The configured endpoints to determine SSL usage from (e.g. from the port). Whether to enable SSL for connections (unless explicitly overridden in a direct set). Gets the SSL Host to check for when connecting to endpoints (customizable in case of internal certificate shenanigans. The configured endpoints to determine SSL host from (e.g. from the port). The common host, if any, detected from the endpoint collection. Allows interception of the transport used to communicate with Redis. Gets the underlying socket endpoint to use when connecting to a logical endpoint. null should be returned if a socket is not required for this endpoint. Allows modification of a between creation and connection. Passed in is the endpoint we're connecting to, which type of connection it is, and the socket itself. For example, a specific local IP endpoint could be bound, linger time altered, etc. Invoked on a connected endpoint before server authentication and other handshakes occur, allowing pre-redis handshakes. By returning a custom , the entire data flow can be intercepted, providing entire custom transports. Create a tunnel via an HTTP proxy server. The endpoint to use as an HTTP proxy server. Illustrates the counters associated with an individual connection. The number of operations that have been completed asynchronously. The number of operations that have been completed synchronously. The type of this connection. The number of operations that failed to complete asynchronously. Indicates if there are any pending items or failures on this connection. Indicates the total number of messages dispatched to a non-preferred endpoint, for example sent to a primary when the caller stated a preference of replica. The number of operations performed on this connection. Operations that have been requested, but which have not yet been sent to the server. Operations for which the response has been processed, but which are awaiting asynchronous completion. Operations that have been sent to the server, but which are awaiting a response. The number of sockets used by this logical connection (total, including reconnects). The number of subscriptions (with and without patterns) currently held against this connection. Indicates the total number of outstanding items against this connection. Indicates the total number of writers items against this connection. See . Contains information about a server connection failure. This constructor is only for testing purposes. The source of the event. Redis endpoint. Redis connection type. Redis connection failure type. The exception that occurred. Connection physical name. Gets the connection-type of the failing connection. Gets the failing server-endpoint. Gets the exception if available (this can be null). The type of failure. Returns the physical name of the connection. Represents an inter-related group of connections to redis servers. A reference to this should be held and re-used. No longer used. Gets or sets whether asynchronous operations should be invoked in a way that guarantees their original delivery order. Tracks overall connection multiplexer counts. Tracks overall connection multiplexer counts. Tracks overall connection multiplexer counts. Should exceptions include identifiable details? (key names, additional .Data annotations) Should exceptions include performance counter details? CPU usage, etc - note that this can be problematic on some platforms. Gets the synchronous timeout associated with the connections. Gets the asynchronous timeout associated with the connections. Gets the client-name that will be used on all new connections. We null coalesce here instead of in Options so that we don't populate it everywhere (e.g. .ToString()), given it's a default. Gets the configuration of the connection. Indicates whether any servers are connected. Indicates whether any servers are currently trying to connect. Get summary statistics associated with all servers in this multiplexer. Wait for a given asynchronous operation to complete (or timeout). The task to wait on. Wait for a given asynchronous operation to complete (or timeout). The type contains in the task to wait on. The task to wait on. Wait for the given asynchronous operations to complete (or timeout). The tasks to wait on. Creates a new instance. The string configuration to use for this multiplexer. The to log to. Creates a new instance. The string configuration to use for this multiplexer. Action to further modify the parsed configuration options. The to log to. Creates a new instance. The configuration options to use for this multiplexer. The to log to. Note: For Sentinel, do not specify a - this is handled automatically. Creates a new instance. The string configuration to use for this multiplexer. The to log to. Creates a new instance. The string configuration to use for this multiplexer. Action to further modify the parsed configuration options. The to log to. Creates a new instance. The configuration options to use for this multiplexer. The to log to. Note: For Sentinel, do not specify a - this is handled automatically. Obtain a pub/sub subscriber connection to the specified server. The async state object to pass to the created . Applies common DB number defaults and rules. Obtain an interactive connection to a database inside redis. The ID to get a database for. The async state to pass into the resulting . Compute the hash-slot of a specified key. The key to get a hash slot ID for. Obtain a configuration API for an individual server. The host to get a server for. The port for to get a server for. The async state to pass into the resulting . Obtain a configuration API for an individual server. The "host:port" string to get a server for. The async state to pass into the resulting . Obtain a configuration API for an individual server. The host to get a server for. The port for to get a server for. Obtain a configuration API for an individual server. The endpoint to get a server for. The async state to pass into the resulting . Obtain configuration APIs for all servers in this multiplexer. Get the hash-slot associated with a given key, if applicable. This can be useful for grouping operations. The to determine the hash slot for. The number of operations that have been performed on all connections. Reconfigure the current connections based on the existing configuration. The to log to. Reconfigure the current connections based on the existing configuration. The to log to. Provides a text overview of the status of all connections. Provides a text overview of the status of all connections. The to log to. Triggers a reconfigure of this multiplexer. This re-assessment of all server endpoints to get the current topology and adjust, the same as if we had first connected. Gets all endpoints defined on the multiplexer. Whether to get only the endpoints specified explicitly in the config. Gets the client name for this multiplexer. Sends request to all compatible clients to reconfigure or reconnect. The command flags to use. The number of instances known to have received the message (however, the actual number can be higher; returns -1 if the operation is pending). Sends request to all compatible clients to reconfigure or reconnect. The command flags to use. The number of instances known to have received the message (however, the actual number can be higher). Release all resources associated with this object. Release all resources associated with this object. Close all connections and release all resources associated with this object. Whether to allow all in-queue commands to complete first. Close all connections and release all resources associated with this object. Whether to allow all in-queue commands to complete first. Invoked by the garbage collector. For debugging: when not enabled, servers cannot connect. For debugging: when not enabled, end-connect is silently ignored (to simulate a long-running connect). Raised whenever a physical connection fails. Raised whenever an internal error occurs (this is primarily for debugging). Raised whenever a physical connection is established. Raised when configuration changes are detected. Raised when nodes are explicitly requested to reconfigure via broadcast. This usually means primary/replica changes. Raised when server indicates a maintenance event is going to happen. Raised when a hash-slot has been relocated. Raised when a server replied with an error message. Write the configuration of all servers to an output stream. The destination stream to write the export to. The options to use for this export. Enables or disables a feature flag. This should only be used under support guidance, and should not be rapidly toggled. Returns the state of a feature flag. This should only be used under support guidance. Register a callback to provide an on-demand ambient session provider based on the calling context; the implementing code is responsible for reliably resolving the same provider based on ambient context, or returning null to not profile The session provider to register. Initializes the connection as a Sentinel connection and adds the necessary event handlers to track changes to the managed primaries. The to log to, if any. Create a new instance that connects to a Sentinel server. The string configuration to use for this multiplexer. The to log to. Create a new instance that connects to a Sentinel server. The string configuration to use for this multiplexer. The to log to. Create a new instance that connects to a Sentinel server. The configuration options to use for this multiplexer. The to log to. Create a new instance that connects to a Sentinel server. The configuration options to use for this multiplexer. The to log to. Create a new instance that connects to a sentinel server, discovers the current primary server for the specified in the config and returns a managed connection to the current primary server. The configuration options to use for this multiplexer. The to log to. Create a new instance that connects to a sentinel server, discovers the current primary server for the specified in the config and returns a managed connection to the current primary server. The configuration options to use for this multiplexer. The to log to. Returns a managed connection to the primary server indicated by the in the config. The configuration to be used when connecting to the primary. The writer to log to, if any. Switches the SentinelMasterConnection over to a new primary. The endpoint responsible for the switch. The connection that should be switched over to a new primary endpoint. The writer to log to, if any. Limit at which to start recording unusual busy patterns (only one log will be retained at a time). Set to a negative value to disable this feature. Obtains the log of unusual busy patterns. Resets the log of unusual busy patterns. Gets the subscriber counts for a channel. if there's a subscription registered at all. Gets which server, if any, there's a registered subscription to for this channel. This may be null if there is a subscription, but we don't have a connected server at the moment. This behavior is fine but IsConnected checks, but is a subtle difference in . Handler that executes whenever a message comes in, this doles out messages to any registered handlers. Updates all subscriptions re-evaluating their state. This clears the current server if it's not connected, prepping them to reconnect. Ensures all subscriptions are connected to a server, if possible. The count of subscriptions attempting to reconnect (same as the count currently not connected). This is the record of a single subscription to a redis server. It's the singular channel (which may or may not be a pattern), to one or more handlers. We subscriber to a redis server once (for all messages) and execute 1-many handlers when a message arrives. Whether the we have is connected. Since we clear on a disconnect, this should stay correct. Gets the configured (P)SUBSCRIBE or (P)UNSUBSCRIBE for an action. Evaluates state and if we're not currently connected, clears the server reference. Provides the ability to iterate over a cursor-based sequence of redis data, synchronously or asynchronously. Gets an enumerator for the sequence. Gets an enumerator for the sequence. Provides the ability to iterate over a cursor-based sequence of redis data, synchronously or asynchronously. Gets the current value of the enumerator. Release all resources associated with this enumerator. Release all resources associated with this enumerator. Try to move to the next item in the sequence. Try to move to the next item in the sequence. Reset the enumerator. The cursor position. This may fail on cluster-proxy - I'm OK with this for now. A list of endpoints. Create a new . Create a new . The endpoints to add to the collection. Format an . The endpoint to get a string representation for. Attempt to parse a string into an . The endpoint string to parse. Adds a new endpoint to the list. The host:port string to add an endpoint for to the collection. Adds a new endpoint to the list. The host to add. The port for to add. Adds a new endpoint to the list. The host to add. The port for to add. Try adding a new endpoint to the list. The endpoint to add. if the endpoint was added, if not. See . The index to add into the collection at. The item to insert at . See . The index to replace an endpoint at. The item to replace the existing endpoint at . Event information related to redis endpoints. This constructor is only for testing purposes. The source of the event. Redis endpoint. The endpoint involved in this event (this can be null). Specifies how elements should be aggregated when combining sorted sets. The values of the combined elements are added. The least value of the combined elements is used. The greatest value of the combined elements is used. Bitwise operators And Or Xor Not The client flags can be a combination of: A Connection to be closed ASAP. b The client is waiting in a blocking operation. c Connection to be closed after writing entire reply. d A watched keys has been modified - EXEC will fail. i The client is waiting for a VM I/O (deprecated). M The client is a primary. N No specific flag set. O The client is a replica in MONITOR mode. P The client is a Pub/Sub subscriber. r The client is in readonly mode against a cluster node. S The client is a normal replica server. u The client is unblocked. U The client is unblocked. x The client is in a MULTI/EXEC context. t The client enabled keys tracking in order to perform client side caching. R The client tracking target client is invalid. B The client enabled broadcast tracking mode. No specific flag set. The client is a replica in MONITOR mode. The client is a replica in MONITOR mode. The client is a normal replica server. The client is a normal replica server. The client is a primary. The client is in a MULTI/EXEC context. The client is waiting in a blocking operation. A watched keys has been modified - EXEC will fail. Connection to be closed after writing entire reply. The client is unblocked. Connection to be closed ASAP. The client is a Pub/Sub subscriber. The client is in readonly mode against a cluster node. The client is connected via a Unix domain socket. The client enabled keys tracking in order to perform client side caching. The client tracking target client is invalid. The client enabled broadcast tracking mode. The class of the connection Regular connections, including MONITOR connections Replication connections Replication connections Subscription connections Behaviour markers associated with a given command Default behaviour. From 2.0, this flag is not used The caller is not interested in the result; the caller will immediately receive a default-value of the expected return type (this value is not indicative of anything at the server). This operation should be performed on the primary if it is available, but read operations may be performed on a replica if no primary is available. This is the default option. This operation should only be performed on the primary. This operation should be performed on the replica if it is available, but will be performed on a primary if no replicas are available. Suitable for read operations only. This operation should be performed on the replica if it is available, but will be performed on a primary if no replicas are available. Suitable for read operations only. This operation should only be performed on a replica. Suitable for read operations only. This operation should only be performed on a replica. Suitable for read operations only. Indicates that this operation should not be forwarded to other servers as a result of an ASK or MOVED response Indicates that script-related operations should use EVAL, not SCRIPT LOAD + EVALSHA Track status of a command while communicating with Redis. Command status unknown. ConnectionMultiplexer has not yet started writing this command to Redis. Command has been sent to Redis. Command is in the backlog, waiting to be processed and written to Redis. The known types of connection failure. This event is not a failure. No viable connections were available for this operation. The socket for this connection failed. Either SSL Stream or Redis authentication failed. An unexpected response was received from the server. An unknown internal error occurred. The socket was closed. The socket was closed. The database is loading and is not available for use. It has not been possible to create an initial connection to the redis server(s). The type of a connection. Not connection-type related. An interactive connection handles request/response commands for accessing data on demand. A subscriber connection receives unsolicited messages from the server as pub/sub events occur. When performing a range query, by default the start / stop limits are inclusive; however, both can also be specified separately as exclusive. Both start and stop are inclusive. Start is exclusive, stop is inclusive. Start is inclusive, stop is exclusive. Both start and stop are exclusive. Specifies when to set the expiry for a key. Set expiry whether or not there is an existing expiry. Set expiry only when the new expiry is greater than current one. Set expiry only when the key has an existing expiry. Set expiry only when the key has no expiry. Set expiry only when the new expiry is less than current one Which settings to export. No options. The output of INFO. The output of CONFIG GET *. The output of CLIENT LIST. The output of CLUSTER NODES. Everything available. Units associated with Geo Commands. Meters Kilometers Miles Feet Specifies what side of the list to refer to. The head of the list. The tail of the list. Additional options for the MIGRATE command. No options specified. Do not remove the key from the local instance. Replace existing key on the remote instance. The direction in which to sequence elements. Ordered from low values to high values. Ordered from high values to low values. Specifies the proxy that is being used to communicate to redis. Direct communication to the redis server(s). Communication via twemproxy. Communication via envoyproxy. Whether a proxy supports databases (e.g. database > 0). Whether a proxy supports pub/sub. Whether a proxy supports the ConnectionMultiplexer.GetServer. Gets whether a given command can be issued only to a primary, or if any server is eligible. The to check. if the command is primary-only, otherwise. The intrinsic data-types supported by redis. The specified key does not exist. Strings are the most basic kind of Redis value. Redis Strings are binary safe, this means that a Redis string can contain any kind of data, for instance a JPEG image or a serialized Ruby object. A String value can be at max 512 Megabytes in length. Redis Lists are simply lists of strings, sorted by insertion order. It is possible to add elements to a Redis List pushing new elements on the head (on the left) or on the tail (on the right) of the list. Redis Sets are an unordered collection of Strings. It is possible to add, remove, and test for existence of members in O(1) (constant time regardless of the number of elements contained inside the Set). Redis Sets have the desirable property of not allowing repeated members. Adding the same element multiple times will result in a set having a single copy of this element. Practically speaking this means that adding a member does not require a check if exists then add operation. Redis Sorted Sets are, similarly to Redis Sets, non repeating collections of Strings. The difference is that every member of a Sorted Set is associated with score, that is used in order to take the sorted set ordered, from the smallest to the greatest score. While members are unique, scores may be repeated. Redis Hashes are maps between string fields and string values, so they are the perfect data type to represent objects (e.g. A User with a number of fields like name, surname, age, and so forth). A Redis Stream is a data structure which models the behavior of an append only log but it has more advanced features for manipulating the data contained within the stream. Each entry in a stream contains a unique message ID and a list of name/value pairs containing the entry's data. The data-type was not recognised by the client library. Additional operations to perform when making a server a primary. No additional operations. Set the tie-breaker key on all available primaries, to specify this server. Broadcast to the pub-sub channel to listening clients to reconfigure themselves. Issue a REPLICAOF to all other known nodes, making this primary of all. Issue a REPLICAOF to all other known nodes, making this primary of all. All additional operations. The underlying result type as defined by Redis. No value was received. Basic strings typically represent status results such as "OK". Error strings represent invalid operation results from the server. Integers are returned for count operations and some integer-based increment operations. Bulk strings represent typical user content values. Array of results (former Multi-bulk). Multi-bulk replies represent complex results such as arrays. A single null value replacing RESP v2 blob and multi-bulk nulls. True or false. A floating point number. A large number non representable by the type Binary safe error code and message. A binary safe string that should be displayed to humans without any escaping or filtering. For instance the output of LATENCY DOCTOR in Redis. An unordered collection of key-value pairs. Keys and values can be any other RESP3 type. An unordered collection of N other types. Like the type, but the client should keep reading the reply ignoring the attribute type, and return it to the client as additional information. Out of band data. The format is like the type, but the client should just check the first string element, stating the type of the out of band data, a call a callback if there is one registered for this specific type of push information. Push types are not related to replies, since they are information that the server may push at any time in the connection, so the client should keep reading if it is reading the reply of a command. If an IProfiledCommand is a retransmission of a previous command, this enum is used to indicate what prompted the retransmission. This can be used to distinguish between transient causes (moving hashslots, joining nodes, etc.) and incorrect routing. No stated reason. Issued to investigate which node owns a key. A node has indicated that it does *not* own the given key. The type of save operation to perform. Instruct Redis to start an Append Only File rewrite process. The rewrite will create a small optimized version of the current Append Only File. Save the DB in background. The OK code is immediately returned. Redis forks, the parent continues to serve the clients, the child saves the DB on disk then exits. A client my be able to check if the operation succeeded using the LASTSAVE command. Save the DB in foreground. This is almost never a good thing to do, and could cause significant blocking. Only do this if you know you need to save. Indicates the flavor of a particular redis server. Classic redis-server server. Monitoring/configuration redis-sentinel server. Distributed redis-cluster server. Distributed redis installation via twemproxy. Redis cluster via envoyproxy. Whether a server type can have only a single primary, meaning an election if multiple are found. Whether a server type supports . Describes an algebraic set operation that can be performed to combine multiple sets. Returns the members of the set resulting from the union of all the given sets. Returns the members of the set resulting from the intersection of all the given sets. Returns the members of the set resulting from the difference between the first set and all the successive sets. Defines the persistence behaviour of the server during shutdown. The data is persisted if save points are configured. The data is NOT persisted even if save points are configured. The data is persisted even if save points are NOT configured. Enum to manage ordering in sorted sets. Bases ordering off of the rank in the sorted set. This means that your start and stop inside the sorted set will be some offset into the set. Bases ordering off of the score in the sorted set. This means your start/stop will be some number which is the score for each member in the sorted set. Bases ordering off of lexicographical order, this is only appropriate in an instance where all the members of your sorted set are given the same score Indicates when this operation should be performed (only some variations are legal in a given context). The operation won't be prevented. The operation should only occur when there is an existing value. The operation should only occur when the new score is greater than the current score. The operation should only occur when the new score is less than the current score. The operation should only occur when there is not an existing value. Specifies how to compare elements for sorting. Elements are interpreted as a double-precision floating point number and sorted numerically. Elements are sorted using their alphabetic form (Redis is UTF-8 aware as long as the !LC_COLLATE environment variable is set at the server). Indicates if we index into a string based on bits or bytes. Indicates the index is the number of bytes into a string. Indicates the index is the number of bits into a string. Indicates when this operation should be performed (only some variations are legal in a given context). The operation should occur whether or not there is an existing value. The operation should only occur when there is an existing value. The operation should only occur when there is not an existing value. Indicates that a command was illegal and was not sent to the server. Creates a new . The message for the exception. Creates a new . The message for the exception. The inner exception. Indicates the time allotted for a command or operation has expired. Creates a new . The message for the exception. The command status, as of when the timeout happened. status of the command while communicating with Redis. Serialization implementation; not intended for general usage. Serialization info. Serialization context. Indicates a connection fault when communicating with redis. Creates a new . The type of connection failure. The message for the exception. Creates a new . The type of connection failure. The message for the exception. The inner exception. Creates a new . The type of connection failure. The message for the exception. The inner exception. The status of the command. The type of connection failure. Status of the command while communicating with Redis. Serialization implementation; not intended for general usage. Serialization info. Serialization context. Indicates an issue communicating with redis. Creates a new . The message for the exception. Creates a new . The message for the exception. The inner exception. Deserialization constructor; not intended for general usage. Serialization info. Serialization context. Indicates an exception raised by a redis server. Creates a new . The message for the exception. Represents a retry policy that performs retries, using a randomized exponential back off scheme to determine the interval between retries. Initializes a new instance using the specified back off interval with default maxDeltaBackOffMilliseconds of 10 seconds. time in milliseconds for the back-off interval between retries Initializes a new instance using the specified back off interval. time in milliseconds for the back-off interval between retries. time in milliseconds for the maximum value that the back-off interval can exponentially grow up to. This method is called by the ConnectionMultiplexer to determine if a reconnect operation can be retried now. The number of times reconnect retries have already been made by the ConnectionMultiplexer while it was in the connecting state. Total elapsed time in milliseconds since the last reconnect retry was made. Utility methods. Create a dictionary from an array of HashEntry values. The entry to convert to a dictionary. Create a dictionary from an array of HashEntry values. The entry to convert to a dictionary. Create a dictionary from an array of SortedSetEntry values. The set entries to convert to a dictionary. Create a dictionary from an array of SortedSetEntry values. The set entries to convert to a dictionary. Create a dictionary from an array of key/value pairs. The pairs to convert to a dictionary. Create a dictionary from an array of key/value pairs. The pairs to convert to a dictionary. Create a dictionary from an array of string pairs. The pairs to convert to a dictionary. Create an array of RedisValues from an array of strings. The string array to convert to RedisValues. Create an array of strings from an array of values. The values to convert to an array. Represent a byte-Lease as a read-only Stream. The lease upon which to base the stream. If true, disposing the stream also disposes the lease. Decode a byte-Lease as a String, optionally specifying the encoding (UTF-8 if omitted). The bytes to decode. The encoding to use. Decode a byte-Lease as a String, optionally specifying the encoding (UTF-8 if omitted). The bytes to decode. The encoding to use. Adapted from IPEndPointParser in Microsoft.AspNetCore Link: Copyright (c) .NET Foundation. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. If Unix sockets are attempted but not supported. Contains information about individual hash-slot relocations. The hash-slot that was relocated. The old endpoint for this hash-slot (if known). The new endpoint for this hash-slot (if known). This constructor is only for testing purposes. The source of the event. Hash slot. Old endpoint. New endpoint. Represents a block of operations that will be sent to the server together. This can be useful to reduce packet fragmentation on slow connections - it can improve the time to get *all* the operations processed, with the trade-off of a slower time to get the *first* operation processed; this is usually a good thing. Unless this batch is a transaction, there is no guarantee that these operations will be processed either contiguously or atomically by the server. Execute the batch operation, sending all queued commands to the server. Note that this operation is neither synchronous nor truly asynchronous - it simply enqueues the buffered messages. To check on completion, you should check the individual responses. Represents the abstract multiplexer API. Gets the client-name that will be used on all new connections. Gets the configuration of the connection. Gets the timeout associated with the connections. The number of operations that have been performed on all connections. Gets or sets whether asynchronous operations should be invoked in a way that guarantees their original delivery order. Indicates whether any servers are connected. Indicates whether any servers are connecting. Should exceptions include identifiable details? (key names, additional annotations). Limit at which to start recording unusual busy patterns (only one log will be retained at a time. Set to a negative value to disable this feature). Register a callback to provide an on-demand ambient session provider based on the calling context. The implementing code is responsible for reliably resolving the same provider based on ambient context, or returning null to not profile. The profiling session provider. Get summary statistics associates with this server. A server replied with an error message. Raised whenever a physical connection fails. Raised whenever an internal error occurs (this is primarily for debugging). Raised whenever a physical connection is established. Raised when configuration changes are detected. Raised when nodes are explicitly requested to reconfigure via broadcast. This usually means primary/replica changes. Raised when server indicates a maintenance event is going to happen. Gets all endpoints defined on the multiplexer. Whether to return only the explicitly configured endpoints. Wait for a given asynchronous operation to complete (or timeout). The task to wait on. Wait for a given asynchronous operation to complete (or timeout). The type in . The task to wait on. Wait for the given asynchronous operations to complete (or timeout). The tasks to wait on. Raised when a hash-slot has been relocated. Compute the hash-slot of a specified key. The key to get a slot ID for. Obtain a pub/sub subscriber connection to the specified server. The async state to pass to the created . Obtain an interactive connection to a database inside redis. The database ID to get. The async state to pass to the created . Obtain a configuration API for an individual server. The host to get a server for. The specific port for to get a server for. The async state to pass to the created . Obtain a configuration API for an individual server. The "host:port" string to get a server for. The async state to pass to the created . Obtain a configuration API for an individual server. The host to get a server for. The specific port for to get a server for. Obtain a configuration API for an individual server. The endpoint to get a server for. The async state to pass to the created . Obtain configuration APIs for all servers in this multiplexer. Reconfigure the current connections based on the existing configuration. The log to write output to. Reconfigure the current connections based on the existing configuration. The log to write output to. Provides a text overview of the status of all connections. Provides a text overview of the status of all connections. The log to write output to. See . Close all connections and release all resources associated with this object. Whether to allow in-queue commands to complete first. Close all connections and release all resources associated with this object. Whether to allow in-queue commands to complete first. Obtains the log of unusual busy patterns. Resets the log of unusual busy patterns. Request all compatible clients to reconfigure or reconnect. The command flags to use. The number of instances known to have received the message (however, the actual number can be higher; returns -1 if the operation is pending). Request all compatible clients to reconfigure or reconnect. The command flags to use. The number of instances known to have received the message (however, the actual number can be higher). Get the hash-slot associated with a given key, if applicable; this can be useful for grouping operations. The key to get a the slot for. Write the configuration of all servers to an output stream. The destination stream to write the export to. The options to use for this export. Describes functionality that is common to both standalone redis servers and redis clusters The numeric identifier of this database Allows creation of a group of operations that will be sent to the server as a single unit, but which may or may not be processed on the server contiguously. The async object state to be passed into the created . The created batch. Allows creation of a group of operations that will be sent to the server as a single unit, and processed on the server as a single unit. The async object state to be passed into the created . The created transaction. Atomically transfer a key from a source Redis instance to a destination Redis instance. On success the key is deleted from the original instance by default, and is guaranteed to exist in the target instance. The key to migrate. The server to migrate the key to. The database to migrate the key to. The timeout to use for the transfer. The options to use for this migration. The flags to use for this operation. Returns the raw DEBUG OBJECT output for a key. This command is not fully documented and should be avoided unless you have good reason, and then avoided anyway. The key to debug. The flags to use for this migration. The raw output from DEBUG OBJECT. Add the specified member to the set stored at key. Specified members that are already a member of this set are ignored. If key does not exist, a new set is created before adding the specified members. The key of the set. The longitude of geo entry. The latitude of the geo entry. The value to set at this entry. The flags to use for this operation. if the specified member was not already present in the set, else . Add the specified member to the set stored at key. Specified members that are already a member of this set are ignored. If key does not exist, a new set is created before adding the specified members. The key of the set. The geo value to store. The flags to use for this operation. if the specified member was not already present in the set, else . Add the specified members to the set stored at key. Specified members that are already a member of this set are ignored. If key does not exist, a new set is created before adding the specified members. The key of the set. The geo values add to the set. The flags to use for this operation. The number of elements that were added to the set, not including all the elements already present into the set. Removes the specified member from the geo sorted set stored at key. Non existing members are ignored. The key of the set. The geo value to remove. The flags to use for this operation. if the member existed in the sorted set and was removed, else . Return the distance between two members in the geospatial index represented by the sorted set. The key of the set. The first member to check. The second member to check. The unit of distance to return (defaults to meters). The flags to use for this operation. The command returns the distance as a double (represented as a string) in the specified unit, or if one or both the elements are missing. Return valid Geohash strings representing the position of one or more elements in a sorted set value representing a geospatial index (where elements were added using GEOADD). The key of the set. The members to get. The flags to use for this operation. The command returns an array where each element is the Geohash corresponding to each member name passed as argument to the command. Return valid Geohash strings representing the position of one or more elements in a sorted set value representing a geospatial index (where elements were added using GEOADD). The key of the set. The member to get. The flags to use for this operation. The command returns an array where each element is the Geohash corresponding to each member name passed as argument to the command. Return the positions (longitude,latitude) of all the specified members of the geospatial index represented by the sorted set at key. The key of the set. The members to get. The flags to use for this operation. The command returns an array where each element is a two elements array representing longitude and latitude (x,y) of each member name passed as argument to the command. Non existing elements are reported as NULL elements of the array. Return the positions (longitude,latitude) of all the specified members of the geospatial index represented by the sorted set at key. The key of the set. The member to get. The flags to use for this operation. The command returns an array where each element is a two elements array representing longitude and latitude (x,y) of each member name passed as argument to the command. Non existing elements are reported as NULL elements of the array. Return the members of a sorted set populated with geospatial information using GEOADD, which are within the borders of the area specified with the center location and the maximum distance from the center (the radius). The key of the set. The member to get a radius of results from. The radius to check. The unit of (defaults to meters). The count of results to get, -1 for unlimited. The order of the results. The search options to use. The flags to use for this operation. The results found within the radius, if any. Return the members of a sorted set populated with geospatial information using GEOADD, which are within the borders of the area specified with the center location and the maximum distance from the center (the radius). The key of the set. The longitude of the point to get a radius of results from. The latitude of the point to get a radius of results from. The radius to check. The unit of (defaults to meters). The count of results to get, -1 for unlimited. The order of the results. The search options to use. The flags to use for this operation. The results found within the radius, if any. Return the members of the geo-encoded sorted set stored at bounded by the provided , centered at the provided set . The key of the set. The set member to use as the center of the shape. The shape to use to bound the geo search. The maximum number of results to pull back. Whether or not to terminate the search after finding results. Must be true of count is -1. The order to sort by (defaults to unordered). The search options to use. The flags for this operation. The results found within the shape, if any. Return the members of the geo-encoded sorted set stored at bounded by the provided , centered at the point provided by the and . The key of the set. The longitude of the center point. The latitude of the center point. The shape to use to bound the geo search. The maximum number of results to pull back. Whether or not to terminate the search after finding results. Must be true of count is -1. The order to sort by (defaults to unordered). The search options to use. The flags for this operation. The results found within the shape, if any. Stores the members of the geo-encoded sorted set stored at bounded by the provided , centered at the provided set . The key of the set. The key to store the result at. The set member to use as the center of the shape. The shape to use to bound the geo search. The maximum number of results to pull back. Whether or not to terminate the search after finding results. Must be true of count is -1. The order to sort by (defaults to unordered). If set to true, the resulting set will be a regular sorted-set containing only distances, rather than a geo-encoded sorted-set. The flags for this operation. The size of the set stored at . Stores the members of the geo-encoded sorted set stored at bounded by the provided , centered at the point provided by the and . The key of the set. The key to store the result at. The longitude of the center point. The latitude of the center point. The shape to use to bound the geo search. The maximum number of results to pull back. Whether or not to terminate the search after finding results. Must be true of count is -1. The order to sort by (defaults to unordered). If set to true, the resulting set will be a regular sorted-set containing only distances, rather than a geo-encoded sorted-set. The flags for this operation. The size of the set stored at . Decrements the number stored at field in the hash stored at key by decrement. If key does not exist, a new key holding a hash is created. If field does not exist the value is set to 0 before the operation is performed. The key of the hash. The field in the hash to decrement. The amount to decrement by. The flags to use for this operation. The value at field after the decrement operation. The range of values supported by HINCRBY is limited to 64 bit signed integers. Decrement the specified field of an hash stored at key, and representing a floating point number, by the specified decrement. If the field does not exist, it is set to 0 before performing the operation. The key of the hash. The field in the hash to decrement. The amount to decrement by. The flags to use for this operation. The value at field after the decrement operation. The precision of the output is fixed at 17 digits after the decimal point regardless of the actual internal precision of the computation. Removes the specified fields from the hash stored at key. Non-existing fields are ignored. Non-existing keys are treated as empty hashes and this command returns 0. The key of the hash. The field in the hash to delete. The flags to use for this operation. if the field was removed. Removes the specified fields from the hash stored at key. Non-existing fields are ignored. Non-existing keys are treated as empty hashes and this command returns 0. The key of the hash. The fields in the hash to delete. The flags to use for this operation. The number of fields that were removed. Returns if field is an existing field in the hash stored at key. The key of the hash. The field in the hash to check. The flags to use for this operation. if the hash contains field, if the hash does not contain field, or key does not exist. Returns the value associated with field in the hash stored at key. The key of the hash. The field in the hash to get. The flags to use for this operation. The value associated with field, or nil when field is not present in the hash or key does not exist. Returns the value associated with field in the hash stored at key. The key of the hash. The field in the hash to get. The flags to use for this operation. The value associated with field, or nil when field is not present in the hash or key does not exist. Returns the values associated with the specified fields in the hash stored at key. For every field that does not exist in the hash, a nil value is returned.Because a non-existing keys are treated as empty hashes, running HMGET against a non-existing key will return a list of nil values. The key of the hash. The fields in the hash to get. The flags to use for this operation. List of values associated with the given fields, in the same order as they are requested. Returns all fields and values of the hash stored at key. The key of the hash to get all entries from. The flags to use for this operation. List of fields and their values stored in the hash, or an empty list when key does not exist. Increments the number stored at field in the hash stored at key by increment. If key does not exist, a new key holding a hash is created. If field does not exist the value is set to 0 before the operation is performed. The key of the hash. The field in the hash to increment. The amount to increment by. The flags to use for this operation. The value at field after the increment operation. The range of values supported by HINCRBY is limited to 64 bit signed integers. Increment the specified field of an hash stored at key, and representing a floating point number, by the specified increment. If the field does not exist, it is set to 0 before performing the operation. The key of the hash. The field in the hash to increment. The amount to increment by. The flags to use for this operation. The value at field after the increment operation. The precision of the output is fixed at 17 digits after the decimal point regardless of the actual internal precision of the computation. Returns all field names in the hash stored at key. The key of the hash. The flags to use for this operation. List of fields in the hash, or an empty list when key does not exist. Returns the number of fields contained in the hash stored at key. The key of the hash. The flags to use for this operation. The number of fields in the hash, or 0 when key does not exist. Gets a random field from the hash at . The key of the hash. The flags to use for this operation. A random hash field name or if the hash does not exist. Gets field names from the hash at . The key of the hash. The number of fields to return. The flags to use for this operation. An array of hash field names of size of at most , or if the hash does not exist. Gets field names and values from the hash at . The key of the hash. The number of fields to return. The flags to use for this operation. An array of hash entries of size of at most , or if the hash does not exist. The HSCAN command is used to incrementally iterate over a hash. The key of the hash. The pattern of keys to get entries for. The page size to iterate by. The flags to use for this operation. Yields all elements of the hash matching the pattern. The HSCAN command is used to incrementally iterate over a hash. Note: to resume an iteration via cursor, cast the original enumerable or enumerator to . The key of the hash. The pattern of keys to get entries for. The page size to iterate by. The cursor position to start at. The page offset to start at. The flags to use for this operation. Yields all elements of the hash matching the pattern. Sets the specified fields to their respective values in the hash stored at key. This command overwrites any specified fields that already exist in the hash, leaving other unspecified fields untouched. If key does not exist, a new key holding a hash is created. The key of the hash. The entries to set in the hash. The flags to use for this operation. Sets field in the hash stored at key to value. If key does not exist, a new key holding a hash is created. If field already exists in the hash, it is overwritten. The key of the hash. The field to set in the hash. The value to set. Which conditions under which to set the field value (defaults to always). The flags to use for this operation. if field is a new field in the hash and value was set, if field already exists in the hash and the value was updated. , Returns the string length of the value associated with field in the hash stored at key. The key of the hash. The field containing the string The flags to use for this operation. The length of the string at field, or 0 when key does not exist. Returns all values in the hash stored at key. The key of the hash. The flags to use for this operation. List of values in the hash, or an empty list when key does not exist. Adds the element to the HyperLogLog data structure stored at the variable name specified as first argument. The key of the hyperloglog. The value to add. The flags to use for this operation. if at least 1 HyperLogLog internal register was altered, otherwise. Adds all the element arguments to the HyperLogLog data structure stored at the variable name specified as first argument. The key of the hyperloglog. The values to add. The flags to use for this operation. if at least 1 HyperLogLog internal register was altered, otherwise. Returns the approximated cardinality computed by the HyperLogLog data structure stored at the specified variable, or 0 if the variable does not exist. The key of the hyperloglog. The flags to use for this operation. The approximated number of unique elements observed via HyperLogLogAdd. Returns the approximated cardinality of the union of the HyperLogLogs passed, by internally merging the HyperLogLogs stored at the provided keys into a temporary hyperLogLog, or 0 if the variable does not exist. The keys of the hyperloglogs. The flags to use for this operation. The approximated number of unique elements observed via HyperLogLogAdd. Merge multiple HyperLogLog values into an unique value that will approximate the cardinality of the union of the observed Sets of the source HyperLogLog structures. The key of the merged hyperloglog. The key of the first hyperloglog to merge. The key of the first hyperloglog to merge. The flags to use for this operation. Merge multiple HyperLogLog values into an unique value that will approximate the cardinality of the union of the observed Sets of the source HyperLogLog structures. The key of the merged hyperloglog. The keys of the hyperloglogs to merge. The flags to use for this operation. Indicate exactly which redis server we are talking to. The key to check. The flags to use for this operation. The endpoint serving the key. Copies the value from the to the specified . The key of the source value to copy. The destination key to copy the source to. The database ID to store in. If default (-1), current database is used. Whether to overwrite an existing values at . If and the key exists, the copy will not succeed. The flags to use for this operation. if key was copied. if key was not copied. Removes the specified key. A key is ignored if it does not exist. If UNLINK is available (Redis 4.0+), it will be used. The key to delete. The flags to use for this operation. if the key was removed. , Removes the specified keys. A key is ignored if it does not exist. If UNLINK is available (Redis 4.0+), it will be used. The keys to delete. The flags to use for this operation. The number of keys that were removed. , Serialize the value stored at key in a Redis-specific format and return it to the user. The returned value can be synthesized back into a Redis key using the RESTORE command. The key to dump. The flags to use for this operation. The serialized value. Returns the internal encoding for the Redis object stored at . The key to dump. The flags to use for this operation. The Redis encoding for the value or is the key does not exist. Returns if key exists. The key to check. The flags to use for this operation. if the key exists. if the key does not exist. Indicates how many of the supplied keys exists. The keys to check. The flags to use for this operation. The number of keys that existed. Set a timeout on . After the timeout has expired, the key will automatically be deleted. A key with an associated timeout is said to be volatile in Redis terminology. The key to set the expiration for. The timeout to set. The flags to use for this operation. if the timeout was set. if key does not exist or the timeout could not be set. If key is updated before the timeout has expired, then the timeout is removed as if the PERSIST command was invoked on key. For Redis versions < 2.1.3, existing timeouts cannot be overwritten. So, if key already has an associated timeout, it will do nothing and return 0. Since Redis 2.1.3, you can update the timeout of a key. It is also possible to remove the timeout using the PERSIST command. See the page on key expiry for more information. , , Set a timeout on . After the timeout has expired, the key will automatically be deleted. A key with an associated timeout is said to be volatile in Redis terminology. The key to set the expiration for. The timeout to set. In Redis 7+, we can choose under which condition the expiration will be set using . The flags to use for this operation. if the timeout was set. if key does not exist or the timeout could not be set. , Set a timeout on . After the timeout has expired, the key will automatically be deleted. A key with an associated timeout is said to be volatile in Redis terminology. The key to set the expiration for. The exact date to expiry to set. The flags to use for this operation. if the timeout was set. if key does not exist or the timeout could not be set. If key is updated before the timeout has expired, then the timeout is removed as if the PERSIST command was invoked on key. For Redis versions < 2.1.3, existing timeouts cannot be overwritten. So, if key already has an associated timeout, it will do nothing and return 0. Since Redis 2.1.3, you can update the timeout of a key. It is also possible to remove the timeout using the PERSIST command. See the page on key expiry for more information. , , Set a timeout on . After the timeout has expired, the key will automatically be deleted. A key with an associated timeout is said to be volatile in Redis terminology. The key to set the expiration for. The timeout to set. In Redis 7+, we choose under which condition the expiration will be set using . The flags to use for this operation. if the timeout was set. if key does not exist or the timeout could not be set. , Returns the absolute time at which the given will expire, if it exists and has an expiration. The key to get the expiration for. The flags to use for this operation. The time at which the given key will expire, or if the key does not exist or has no associated expiration time. , Returns the logarithmic access frequency counter of the object stored at . The command is only available when the maxmemory-policy configuration directive is set to one of the LFU policies. The key to get a frequency count for. The flags to use for this operation. The number of logarithmic access frequency counter, ( if the key does not exist). Returns the time since the object stored at the specified key is idle (not requested by read or write operations). The key to get the time of. The flags to use for this operation. The time since the object stored at the specified key is idle. Move key from the currently selected database (see SELECT) to the specified destination database. When key already exists in the destination database, or it does not exist in the source database, it does nothing. It is possible to use MOVE as a locking primitive because of this. The key to move. The database to move the key to. The flags to use for this operation. if key was moved. if key was not moved. Remove the existing timeout on key, turning the key from volatile (a key with an expire set) to persistent (a key that will never expire as no timeout is associated). The key to persist. The flags to use for this operation. if the timeout was removed. if key does not exist or does not have an associated timeout. Return a random key from the currently selected database. The flags to use for this operation. The random key, or nil when the database is empty. Returns the reference count of the object stored at . The key to get a reference count for. The flags to use for this operation. The number of references ( if the key does not exist). Renames to . It returns an error when the source and destination names are the same, or when key does not exist. The key to rename. The key to rename to. What conditions to rename under (defaults to always). The flags to use for this operation. if the key was renamed, otherwise. , Create a key associated with a value that is obtained by deserializing the provided serialized value (obtained via DUMP). If is 0 the key is created without any expire, otherwise the specified expire time (in milliseconds) is set. The key to restore. The value of the key. The expiry to set. The flags to use for this operation. Returns the remaining time to live of a key that has a timeout. This introspection capability allows a Redis client to check how many seconds a given key will continue to be part of the dataset. The key to check. The flags to use for this operation. TTL, or nil when key does not exist or does not have a timeout. Alters the last access time of a key. The key to touch. The flags to use for this operation. if the key was touched, otherwise. Alters the last access time of the specified . A key is ignored if it does not exist. The keys to touch. The flags to use for this operation. The number of keys that were touched. Returns the string representation of the type of the value stored at key. The different types that can be returned are: string, list, set, zset and hash. The key to get the type of. The flags to use for this operation. Type of key, or none when key does not exist. Returns the element at index in the list stored at key. The index is zero-based, so 0 means the first element, 1 the second element and so on. Negative indices can be used to designate elements starting at the tail of the list. Here, -1 means the last element, -2 means the penultimate and so forth. The key of the list. The index position to get the value at. The flags to use for this operation. The requested element, or nil when index is out of range. Inserts value in the list stored at key either before or after the reference value pivot. When key does not exist, it is considered an empty list and no operation is performed. The key of the list. The value to insert after. The value to insert. The flags to use for this operation. The length of the list after the insert operation, or -1 when the value pivot was not found. Inserts value in the list stored at key either before or after the reference value pivot. When key does not exist, it is considered an empty list and no operation is performed. The key of the list. The value to insert before. The value to insert. The flags to use for this operation. The length of the list after the insert operation, or -1 when the value pivot was not found. Removes and returns the first element of the list stored at key. The key of the list. The flags to use for this operation. The value of the first element, or nil when key does not exist. Removes and returns count elements from the head of the list stored at key. If the list contains less than count elements, removes and returns the number of elements in the list. The key of the list. The number of elements to remove The flags to use for this operation. Array of values that were popped, or nil if the key doesn't exist. Removes and returns at most elements from the first non-empty list in . Starts on the left side of the list. The keys to look through for elements to pop. The maximum number of elements to pop from the list. The flags to use for this operation. A span of contiguous elements from the list, or if no non-empty lists are found. Scans through the list stored at looking for , returning the 0-based index of the first matching element. The key of the list. The element to search for. The rank of the first element to return, within the sub-list of matching indexes in the case of multiple matches. The maximum number of elements to scan through before stopping, defaults to 0 (a full scan of the list.) The flags to use for this operation. The 0-based index of the first matching element, or -1 if not found. Scans through the list stored at looking for instances of , returning the 0-based indexes of any matching elements. The key of the list. The element to search for. The number of matches to find. A count of 0 will return the indexes of all occurrences of the element. The rank of the first element to return, within the sub-list of matching indexes in the case of multiple matches. The maximum number of elements to scan through before stopping, defaults to 0 (a full scan of the list.) The flags to use for this operation. An array of at most of indexes of matching elements. If none are found, and empty array is returned. Insert the specified value at the head of the list stored at key. If key does not exist, it is created as empty list before performing the push operations. The key of the list. The value to add to the head of the list. Which conditions to add to the list under (defaults to always). The flags to use for this operation. The length of the list after the push operations. , Insert the specified value at the head of the list stored at key. If key does not exist, it is created as empty list before performing the push operations. The key of the list. The value to add to the head of the list. Which conditions to add to the list under (defaults to always). The flags to use for this operation. The length of the list after the push operations. , Insert all the specified values at the head of the list stored at key. If key does not exist, it is created as empty list before performing the push operations. Elements are inserted one after the other to the head of the list, from the leftmost element to the rightmost element. So for instance the command LPUSH mylist a b c will result into a list containing c as first element, b as second element and a as third element. The key of the list. The values to add to the head of the list. The flags to use for this operation. The length of the list after the push operations. Returns the length of the list stored at key. If key does not exist, it is interpreted as an empty list and 0 is returned. The key of the list. The flags to use for this operation. The length of the list at key. Returns and removes the first or last element of the list stored at , and pushes the element as the first or last element of the list stored at . The key of the list to remove from. The key of the list to move to. What side of the list to remove from. What side of the list to move to. The flags to use for this operation. The element being popped and pushed or if there is no element to move. Returns the specified elements of the list stored at key. The offsets start and stop are zero-based indexes, with 0 being the first element of the list (the head of the list), 1 being the next element and so on. These offsets can also be negative numbers indicating offsets starting at the end of the list.For example, -1 is the last element of the list, -2 the penultimate, and so on. Note that if you have a list of numbers from 0 to 100, LRANGE list 0 10 will return 11 elements, that is, the rightmost item is included. The key of the list. The start index of the list. The stop index of the list. The flags to use for this operation. List of elements in the specified range. Removes the first count occurrences of elements equal to value from the list stored at key. The count argument influences the operation in the following ways: count > 0: Remove elements equal to value moving from head to tail. count < 0: Remove elements equal to value moving from tail to head. count = 0: Remove all elements equal to value. The key of the list. The value to remove from the list. The count behavior (see method summary). The flags to use for this operation. The number of removed elements. Removes and returns the last element of the list stored at key. The key of the list. The flags to use for this operation. The element being popped. Removes and returns count elements from the end the list stored at key. If the list contains less than count elements, removes and returns the number of elements in the list. The key of the list. The number of elements to pop The flags to use for this operation. Array of values that were popped, or nil if the key doesn't exist. Removes and returns at most elements from the first non-empty list in . Starts on the right side of the list. The keys to look through for elements to pop. The maximum number of elements to pop from the list. The flags to use for this operation. A span of contiguous elements from the list, or if no non-empty lists are found. Atomically returns and removes the last element (tail) of the list stored at source, and pushes the element at the first element (head) of the list stored at destination. The key of the source list. The key of the destination list. The flags to use for this operation. The element being popped and pushed. Insert the specified value at the tail of the list stored at key. If key does not exist, it is created as empty list before performing the push operation. The key of the list. The value to add to the tail of the list. Which conditions to add to the list under. The flags to use for this operation. The length of the list after the push operation. , Insert the specified value at the tail of the list stored at key. If key does not exist, it is created as empty list before performing the push operation. The key of the list. The values to add to the tail of the list. Which conditions to add to the list under. The flags to use for this operation. The length of the list after the push operation. , Insert all the specified values at the tail of the list stored at key. If key does not exist, it is created as empty list before performing the push operation. Elements are inserted one after the other to the tail of the list, from the leftmost element to the rightmost element. So for instance the command RPUSH mylist a b c will result into a list containing a as first element, b as second element and c as third element. The key of the list. The values to add to the tail of the list. The flags to use for this operation. The length of the list after the push operation. Sets the list element at index to value. For more information on the index argument, see . An error is returned for out of range indexes. The key of the list. The index to set the value at. The values to add to the list. The flags to use for this operation. Trim an existing list so that it will contain only the specified range of elements specified. Both start and stop are zero-based indexes, where 0 is the first element of the list (the head), 1 the next element and so on. For example: LTRIM foobar 0 2 will modify the list stored at foobar so that only the first three elements of the list will remain. start and end can also be negative numbers indicating offsets from the end of the list, where -1 is the last element of the list, -2 the penultimate element and so on. The key of the list. The start index of the list to trim to. The end index of the list to trim to. The flags to use for this operation. Extends a lock, if the token value is correct. The key of the lock. The value to set at the key. The expiration of the lock key. The flags to use for this operation. if the lock was successfully extended. Queries the token held against a lock. The key of the lock. The flags to use for this operation. The current value of the lock, if any. Releases a lock, if the token value is correct. The key of the lock. The value at the key that must match. The flags to use for this operation. if the lock was successfully released, otherwise. Takes a lock (specifying a token value) if it is not already taken. The key of the lock. The value to set at the key. The expiration of the lock key. The flags to use for this operation. if the lock was successfully taken, otherwise. Posts a message to the given channel. The channel to publish to. The message to send. The flags to use for this operation. The number of clients that received the message *on the destination server*, note that this doesn't mean much in a cluster as clients can get the message through other nodes. Execute an arbitrary command against the server; this is primarily intended for executing modules, but may also be used to provide access to new features that lack a direct API. The command to run. The arguments to pass for the command. A dynamic representation of the command's result. This API should be considered an advanced feature; inappropriate use can be harmful. Execute an arbitrary command against the server; this is primarily intended for executing modules, but may also be used to provide access to new features that lack a direct API. The command to run. The arguments to pass for the command. The flags to use for this operation. A dynamic representation of the command's result. This API should be considered an advanced feature; inappropriate use can be harmful. Execute a Lua script against the server. The script to execute. The keys to execute against. The values to execute against. The flags to use for this operation. A dynamic representation of the script's result. , Execute a Lua script against the server using just the SHA1 hash. The hash of the script to execute. The keys to execute against. The values to execute against. The flags to use for this operation. A dynamic representation of the script's result. Be aware that this method is not resilient to Redis server restarts. Use instead. Execute a lua script against the server, using previously prepared script. Named parameters, if any, are provided by the `parameters` object. The script to execute. The parameters to pass to the script. The flags to use for this operation. A dynamic representation of the script's result. Execute a lua script against the server, using previously prepared and loaded script. This method sends only the SHA1 hash of the lua script to Redis. Named parameters, if any, are provided by the `parameters` object. The already-loaded script to execute. The parameters to pass to the script. The flags to use for this operation. A dynamic representation of the script's result. Read-only variant of the EVAL command that cannot execute commands that modify data, Execute a Lua script against the server. The script to execute. The keys to execute against. The values to execute against. The flags to use for this operation. A dynamic representation of the script's result. , Read-only variant of the EVALSHA command that cannot execute commands that modify data, Execute a Lua script against the server using just the SHA1 hash. The hash of the script to execute. The keys to execute against. The values to execute against. The flags to use for this operation. A dynamic representation of the script's result. Add the specified member to the set stored at key. Specified members that are already a member of this set are ignored. If key does not exist, a new set is created before adding the specified members. The key of the set. The value to add to the set. The flags to use for this operation. if the specified member was not already present in the set, else . Add the specified members to the set stored at key. Specified members that are already a member of this set are ignored. If key does not exist, a new set is created before adding the specified members. The key of the set. The values to add to the set. The flags to use for this operation. The number of elements that were added to the set, not including all the elements already present into the set. Returns the members of the set resulting from the specified operation against the given sets. The operation to perform. The key of the first set. The key of the second set. The flags to use for this operation. List with members of the resulting set. , , Returns the members of the set resulting from the specified operation against the given sets. The operation to perform. The keys of the sets to operate on. The flags to use for this operation. List with members of the resulting set. , , This command is equal to SetCombine, but instead of returning the resulting set, it is stored in destination. If destination already exists, it is overwritten. The operation to perform. The key of the destination set. The key of the first set. The key of the second set. The flags to use for this operation. The number of elements in the resulting set. , , This command is equal to SetCombine, but instead of returning the resulting set, it is stored in destination. If destination already exists, it is overwritten. The operation to perform. The key of the destination set. The keys of the sets to operate on. The flags to use for this operation. The number of elements in the resulting set. , , Returns whether is a member of the set stored at . The key of the set. The value to check for. The flags to use for this operation. if the element is a member of the set. if the element is not a member of the set, or if key does not exist. Returns whether each of is a member of the set stored at . The key of the set. The members to check for. The flags to use for this operation. if the element is a member of the set. if the element is not a member of the set, or if key does not exist. Returns the set cardinality (number of elements) of the intersection between the sets stored at the given . If the intersection cardinality reaches partway through the computation, the algorithm will exit and yield as the cardinality. The keys of the sets. The number of elements to check (defaults to 0 and means unlimited). The flags to use for this operation. The cardinality (number of elements) of the set, or 0 if key does not exist. Returns the set cardinality (number of elements) of the set stored at key. The key of the set. The flags to use for this operation. The cardinality (number of elements) of the set, or 0 if key does not exist. Returns all the members of the set value stored at key. The key of the set. The flags to use for this operation. All elements of the set. Move member from the set at source to the set at destination. This operation is atomic. In every given moment the element will appear to be a member of source or destination for other clients. When the specified element already exists in the destination set, it is only removed from the source set. The key of the source set. The key of the destination set. The value to move. The flags to use for this operation. if the element is moved. if the element is not a member of source and no operation was performed. Removes and returns a random element from the set value stored at key. The key of the set. The flags to use for this operation. The removed element, or nil when key does not exist. Removes and returns the specified number of random elements from the set value stored at key. The key of the set. The number of elements to return. The flags to use for this operation. An array of elements, or an empty array when key does not exist. Return a random element from the set value stored at . The key of the set. The flags to use for this operation. The randomly selected element, or when does not exist. Return an array of count distinct elements if count is positive. If called with a negative count the behavior changes and the command is allowed to return the same element multiple times. In this case the number of returned elements is the absolute value of the specified count. The key of the set. The count of members to get. The flags to use for this operation. An array of elements, or an empty array when does not exist. Remove the specified member from the set stored at key. Specified members that are not a member of this set are ignored. The key of the set. The value to remove. The flags to use for this operation. if the specified member was already present in the set, otherwise. Remove the specified members from the set stored at key. Specified members that are not a member of this set are ignored. The key of the set. The values to remove. The flags to use for this operation. The number of members that were removed from the set, not including non existing members. The SSCAN command is used to incrementally iterate over a set. The key of the set. The pattern to match. The page size to iterate by. The flags to use for this operation. Yields all matching elements of the set. The SSCAN command is used to incrementally iterate over set. Note: to resume an iteration via cursor, cast the original enumerable or enumerator to . The key of the set. The pattern to match. The page size to iterate by. The cursor position to start at. The page offset to start at. The flags to use for this operation. Yields all matching elements of the set. Sorts a list, set or sorted set (numerically or alphabetically, ascending by default). By default, the elements themselves are compared, but the values can also be used to perform external key-lookups using the by parameter. By default, the elements themselves are returned, but external key-lookups (one or many) can be performed instead by specifying the get parameter (note that # specifies the element itself, when used in get). Referring to the redis SORT documentation for examples is recommended. When used in hashes, by and get can be used to specify fields using -> notation (again, refer to redis documentation). Uses SORT_RO when possible. The key of the list, set, or sorted set. How many entries to skip on the return. How many entries to take on the return. The ascending or descending order (defaults to ascending). The sorting method (defaults to numeric). The key pattern to sort by, if any. e.g. ExternalKey_* would sort by ExternalKey_{listvalue} as a lookup. The key pattern to sort by, if any e.g. ExternalKey_* would return the value of ExternalKey_{listvalue} for each entry. The flags to use for this operation. The sorted elements, or the external values if get is specified. , Sorts a list, set or sorted set (numerically or alphabetically, ascending by default). By default, the elements themselves are compared, but the values can also be used to perform external key-lookups using the by parameter. By default, the elements themselves are returned, but external key-lookups (one or many) can be performed instead by specifying the get parameter (note that # specifies the element itself, when used in get). Referring to the redis SORT documentation for examples is recommended. When used in hashes, by and get can be used to specify fields using -> notation (again, refer to redis documentation). The destination key to store results in. The key of the list, set, or sorted set. How many entries to skip on the return. How many entries to take on the return. The ascending or descending order (defaults to ascending). The sorting method (defaults to numeric). The key pattern to sort by, if any. e.g. ExternalKey_* would sort by ExternalKey_{listvalue} as a lookup. The key pattern to sort by, if any e.g. ExternalKey_* would return the value of ExternalKey_{listvalue} for each entry. The flags to use for this operation. The number of elements stored in the new list. Adds the specified member with the specified score to the sorted set stored at key. If the specified member is already a member of the sorted set, the score is updated and the element reinserted at the right position to ensure the correct ordering. The key of the sorted set. The member to add to the sorted set. The score for the member to add to the sorted set. What conditions to add the element under (defaults to always). The flags to use for this operation. if the value was added. if it already existed (the score is still updated). Adds all the specified members with the specified scores to the sorted set stored at key. If a specified member is already a member of the sorted set, the score is updated and the element reinserted at the right position to ensure the correct ordering. The key of the sorted set. The members and values to add to the sorted set. What conditions to add the element under (defaults to always). The flags to use for this operation. The number of elements added to the sorted sets, not including elements already existing for which the score was updated. Computes a set operation for multiple sorted sets (optionally using per-set ), optionally performing a specific aggregation (defaults to ). cannot be used with weights or aggregation. The operation to perform. The keys of the sorted sets. The optional weights per set that correspond to . The aggregation method (defaults to ). The flags to use for this operation. The resulting sorted set. , , Computes a set operation for multiple sorted sets (optionally using per-set ), optionally performing a specific aggregation (defaults to ). cannot be used with weights or aggregation. The operation to perform. The keys of the sorted sets. The optional weights per set that correspond to . The aggregation method (defaults to ). The flags to use for this operation. The resulting sorted set with scores. , , Computes a set operation over two sorted sets, and stores the result in destination, optionally performing a specific aggregation (defaults to sum). cannot be used with aggregation. The operation to perform. The key to store the results in. The key of the first sorted set. The key of the second sorted set. The aggregation method (defaults to sum). The flags to use for this operation. The number of elements in the resulting sorted set at destination. , , Computes a set operation over multiple sorted sets (optionally using per-set weights), and stores the result in destination, optionally performing a specific aggregation (defaults to sum). cannot be used with aggregation. The operation to perform. The key to store the results in. The keys of the sorted sets. The optional weights per set that correspond to . The aggregation method (defaults to sum). The flags to use for this operation. The number of elements in the resulting sorted set at destination. , , Decrements the score of member in the sorted set stored at key by decrement. If member does not exist in the sorted set, it is added with -decrement as its score (as if its previous score was 0.0). The key of the sorted set. The member to decrement. The amount to decrement by. The flags to use for this operation. The new score of member. Increments the score of member in the sorted set stored at key by increment. If member does not exist in the sorted set, it is added with increment as its score (as if its previous score was 0.0). The key of the sorted set. The member to increment. The amount to increment by. The flags to use for this operation. The new score of member. Returns the cardinality of the intersection of the sorted sets at . The keys of the sorted sets. If the intersection cardinality reaches partway through the computation, the algorithm will exit and yield as the cardinality (defaults to 0 meaning unlimited). The flags to use for this operation. The number of elements in the resulting intersection. Returns the sorted set cardinality (number of elements) of the sorted set stored at key. The key of the sorted set. The min score to filter by (defaults to negative infinity). The max score to filter by (defaults to positive infinity). Whether to exclude and from the range check (defaults to both inclusive). The flags to use for this operation. The cardinality (number of elements) of the sorted set, or 0 if key does not exist. When all the elements in a sorted set are inserted with the same score, in order to force lexicographical ordering. This command returns the number of elements in the sorted set at key with a value between min and max. The key of the sorted set. The min value to filter by. The max value to filter by. Whether to exclude and from the range check (defaults to both inclusive). The flags to use for this operation. The number of elements in the specified score range. Returns a random element from the sorted set value stored at . The key of the sorted set. The flags to use for this operation. The randomly selected element, or when does not exist. Returns an array of random elements from the sorted set value stored at . The key of the sorted set. If the provided count argument is positive, returns an array of distinct elements. The array's length is either or the sorted set's cardinality (ZCARD), whichever is lower. If called with a negative count, the behavior changes and the command is allowed to return the same element multiple times. In this case, the number of returned elements is the absolute value of the specified count. The flags to use for this operation. The randomly selected elements, or an empty array when does not exist. Returns an array of random elements from the sorted set value stored at . The key of the sorted set. If the provided count argument is positive, returns an array of distinct elements. The array's length is either or the sorted set's cardinality (ZCARD), whichever is lower. If called with a negative count, the behavior changes and the command is allowed to return the same element multiple times. In this case, the number of returned elements is the absolute value of the specified count. The flags to use for this operation. The randomly selected elements with scores, or an empty array when does not exist. Returns the specified range of elements in the sorted set stored at key. By default the elements are considered to be ordered from the lowest to the highest score. Lexicographical order is used for elements with equal score. Both start and stop are zero-based indexes, where 0 is the first element, 1 is the next element and so on. They can also be negative numbers indicating offsets from the end of the sorted set, with -1 being the last element of the sorted set, -2 the penultimate element and so on. The key of the sorted set. The start index to get. The stop index to get. The order to sort by (defaults to ascending). The flags to use for this operation. List of elements in the specified range. , Takes the specified range of elements in the sorted set of the and stores them in a new sorted set at the . The sorted set to take the range from. Where the resulting set will be stored. The starting point in the sorted set. If is , this should be a string. The stopping point in the range of the sorted set. If is , this should be a string. The ordering criteria to use for the range. Choices are , , and (defaults to ). Whether to exclude and from the range check (defaults to both inclusive). The direction to consider the and in. If , the must be smaller than the . If , must be smaller than . The number of elements into the sorted set to skip. Note: this iterates after sorting so incurs O(n) cost for large values. The maximum number of elements to pull into the new () set. The flags to use for this operation. The cardinality of (number of elements in) the newly created sorted set. Returns the specified range of elements in the sorted set stored at key. By default the elements are considered to be ordered from the lowest to the highest score. Lexicographical order is used for elements with equal score. Both start and stop are zero-based indexes, where 0 is the first element, 1 is the next element and so on. They can also be negative numbers indicating offsets from the end of the sorted set, with -1 being the last element of the sorted set, -2 the penultimate element and so on. The key of the sorted set. The start index to get. The stop index to get. The order to sort by (defaults to ascending). The flags to use for this operation. List of elements in the specified range. , Returns the specified range of elements in the sorted set stored at key. By default the elements are considered to be ordered from the lowest to the highest score. Lexicographical order is used for elements with equal score. Start and stop are used to specify the min and max range for score values. Similar to other range methods the values are inclusive. The key of the sorted set. The minimum score to filter by. The maximum score to filter by. Which of and to exclude (defaults to both inclusive). The order to sort by (defaults to ascending). How many items to skip. How many items to take. The flags to use for this operation. List of elements in the specified score range. , Returns the specified range of elements in the sorted set stored at key. By default the elements are considered to be ordered from the lowest to the highest score. Lexicographical order is used for elements with equal score. Start and stop are used to specify the min and max range for score values. Similar to other range methods the values are inclusive. The key of the sorted set. The minimum score to filter by. The maximum score to filter by. Which of and to exclude (defaults to both inclusive). The order to sort by (defaults to ascending). How many items to skip. How many items to take. The flags to use for this operation. List of elements in the specified score range. , When all the elements in a sorted set are inserted with the same score, in order to force lexicographical ordering. This command returns all the elements in the sorted set at key with a value between min and max. The key of the sorted set. The min value to filter by. The max value to filter by. Which of and to exclude (defaults to both inclusive). How many items to skip. How many items to take. The flags to use for this operation. List of elements in the specified score range. When all the elements in a sorted set are inserted with the same score, in order to force lexicographical ordering. This command returns all the elements in the sorted set at key with a value between min and max. The key of the sorted set. The min value to filter by. The max value to filter by. Which of and to exclude (defaults to both inclusive). Whether to order the data ascending or descending How many items to skip. How many items to take. The flags to use for this operation. List of elements in the specified score range. , Returns the rank of member in the sorted set stored at key, by default with the scores ordered from low to high. The rank (or index) is 0-based, which means that the member with the lowest score has rank 0. The key of the sorted set. The member to get the rank of. The order to sort by (defaults to ascending). The flags to use for this operation. If member exists in the sorted set, the rank of member. If member does not exist in the sorted set or key does not exist, . , Removes the specified member from the sorted set stored at key. Non existing members are ignored. The key of the sorted set. The member to remove. The flags to use for this operation. if the member existed in the sorted set and was removed. otherwise. Removes the specified members from the sorted set stored at key. Non existing members are ignored. The key of the sorted set. The members to remove. The flags to use for this operation. The number of members removed from the sorted set, not including non existing members. Removes all elements in the sorted set stored at key with rank between start and stop. Both start and stop are 0 -based indexes with 0 being the element with the lowest score. These indexes can be negative numbers, where they indicate offsets starting at the element with the highest score. For example: -1 is the element with the highest score, -2 the element with the second highest score and so forth. The key of the sorted set. The minimum rank to remove. The maximum rank to remove. The flags to use for this operation. The number of elements removed. Removes all elements in the sorted set stored at key with a score between min and max (inclusive by default). The key of the sorted set. The minimum score to remove. The maximum score to remove. Which of and to exclude (defaults to both inclusive). The flags to use for this operation. The number of elements removed. When all the elements in a sorted set are inserted with the same score, in order to force lexicographical ordering. This command removes all elements in the sorted set stored at key between the lexicographical range specified by min and max. The key of the sorted set. The minimum value to remove. The maximum value to remove. Which of and to exclude (defaults to both inclusive). The flags to use for this operation. The number of elements removed. The ZSCAN command is used to incrementally iterate over a sorted set. The key of the sorted set. The pattern to match. The page size to iterate by. The flags to use for this operation. Yields all matching elements of the sorted set. The ZSCAN command is used to incrementally iterate over a sorted set Note: to resume an iteration via cursor, cast the original enumerable or enumerator to IScanningCursor. The key of the sorted set. The pattern to match. The page size to iterate by. The cursor position to start at. The page offset to start at. The flags to use for this operation. Yields all matching elements of the sorted set. Returns the score of member in the sorted set at key. If member does not exist in the sorted set, or key does not exist, nil is returned. The key of the sorted set. The member to get a score for. The flags to use for this operation. The score of the member. Returns the scores of members in the sorted set at . If a member does not exist in the sorted set, or key does not exist, is returned. The key of the sorted set. The members to get a score for. The flags to use for this operation. The scores of the members in the same order as the array. If a member does not exist in the set, is returned. Removes and returns the first element from the sorted set stored at key, by default with the scores ordered from low to high. The key of the sorted set. The order to sort by (defaults to ascending). The flags to use for this operation. The removed element, or nil when key does not exist. , Removes and returns the specified number of first elements from the sorted set stored at key, by default with the scores ordered from low to high. The key of the sorted set. The number of elements to return. The order to sort by (defaults to ascending). The flags to use for this operation. An array of elements, or an empty array when key does not exist. , Removes and returns up to entries from the first non-empty sorted set in . Returns if none of the sets exist or contain any elements. The keys to check. The maximum number of records to pop out of the sorted set. The order to sort by when popping items out of the set. The flags to use for the operation. A contiguous collection of sorted set entries with the key they were popped from, or if no non-empty sorted sets are found. Same as but return the number of the elements changed. The key of the sorted set. The member to add/update to the sorted set. The score for the member to add/update to the sorted set. What conditions to add the element under (defaults to always). The flags to use for this operation. The number of elements changed. Same as but return the number of the elements changed. The key of the sorted set. The members and values to add/update to the sorted set. What conditions to add the element under (defaults to always). The flags to use for this operation. The number of elements changed. Allow the consumer to mark a pending message as correctly processed. Returns the number of messages acknowledged. The key of the stream. The name of the consumer group that received the message. The ID of the message to acknowledge. The flags to use for this operation. The number of messages acknowledged. Allow the consumer to mark a pending message as correctly processed. Returns the number of messages acknowledged. The key of the stream. The name of the consumer group that received the message. The IDs of the messages to acknowledge. The flags to use for this operation. The number of messages acknowledged. Adds an entry using the specified values to the given stream key. If key does not exist, a new key holding a stream is created. The command returns the ID of the newly created stream entry. The key of the stream. The field name for the stream entry. The value to set in the stream entry. The ID to assign to the stream entry, defaults to an auto-generated ID ("*"). The maximum length of the stream. If true, the "~" argument is used to allow the stream to exceed max length by a small number. This improves performance when removing messages. The flags to use for this operation. The ID of the newly created message. Adds an entry using the specified values to the given stream key. If key does not exist, a new key holding a stream is created. The command returns the ID of the newly created stream entry. The key of the stream. The fields and their associated values to set in the stream entry. The ID to assign to the stream entry, defaults to an auto-generated ID ("*"). The maximum length of the stream. If true, the "~" argument is used to allow the stream to exceed max length by a small number. This improves performance when removing messages. The flags to use for this operation. The ID of the newly created message. Change ownership of messages consumed, but not yet acknowledged, by a different consumer. Messages that have been idle for more than will be claimed. The key of the stream. The consumer group. The consumer claiming the messages(s). The minimum idle time threshold for pending messages to be claimed. The starting ID to scan for pending messages that have an idle time greater than . The upper limit of the number of entries that the command attempts to claim. If , Redis will default the value to 100. The flags to use for this operation. An instance of . Change ownership of messages consumed, but not yet acknowledged, by a different consumer. Messages that have been idle for more than will be claimed. The result will contain the claimed message IDs instead of a instance. The key of the stream. The consumer group. The consumer claiming the messages(s). The minimum idle time threshold for pending messages to be claimed. The starting ID to scan for pending messages that have an idle time greater than . The upper limit of the number of entries that the command attempts to claim. If , Redis will default the value to 100. The flags to use for this operation. An instance of . Change ownership of messages consumed, but not yet acknowledged, by a different consumer. This method returns the complete message for the claimed message(s). The key of the stream. The consumer group. The consumer claiming the given message(s). The minimum message idle time to allow the reassignment of the message(s). The IDs of the messages to claim for the given consumer. The flags to use for this operation. The messages successfully claimed by the given consumer. Change ownership of messages consumed, but not yet acknowledged, by a different consumer. This method returns the IDs for the claimed message(s). The key of the stream. The consumer group. The consumer claiming the given message(s). The minimum message idle time to allow the reassignment of the message(s). The IDs of the messages to claim for the given consumer. The flags to use for this operation. The message IDs for the messages successfully claimed by the given consumer. Set the position from which to read a stream for a consumer group. The key of the stream. The name of the consumer group. The position from which to read for the consumer group. The flags to use for this operation. if successful, otherwise. Retrieve information about the consumers for the given consumer group. This is the equivalent of calling "XINFO GROUPS key group". The key of the stream. The consumer group name. The flags to use for this operation. An instance of for each of the consumer group's consumers. Create a consumer group for the given stream. The key of the stream. The name of the group to create. The position to begin reading the stream. Defaults to . The flags to use for this operation. if the group was created, otherwise. Create a consumer group for the given stream. The key of the stream. The name of the group to create. The position to begin reading the stream. Defaults to . Create the stream if it does not already exist. The flags to use for this operation. if the group was created, otherwise. Delete messages in the stream. This method does not delete the stream. The key of the stream. The IDs of the messages to delete. The flags to use for this operation. Returns the number of messages successfully deleted from the stream. Delete a consumer from a consumer group. The key of the stream. The name of the consumer group. The name of the consumer. The flags to use for this operation. The number of messages that were pending for the deleted consumer. Delete a consumer group. The key of the stream. The name of the consumer group. The flags to use for this operation. if deleted, otherwise. Retrieve information about the groups created for the given stream. This is the equivalent of calling "XINFO GROUPS key". The key of the stream. The flags to use for this operation. An instance of for each of the stream's groups. Retrieve information about the given stream. This is the equivalent of calling "XINFO STREAM key". The key of the stream. The flags to use for this operation. A instance with information about the stream. Return the number of entries in a stream. The key of the stream. The flags to use for this operation. The number of entries inside the given stream. View information about pending messages for a stream. A pending message is a message read using StreamReadGroup (XREADGROUP) but not yet acknowledged. The key of the stream. The name of the consumer group The flags to use for this operation. An instance of . contains the number of pending messages. The highest and lowest ID of the pending messages, and the consumers with their pending message count. The equivalent of calling XPENDING key group. View information about each pending message. The key of the stream. The name of the consumer group. The maximum number of pending messages to return. The consumer name for the pending messages. Pass RedisValue.Null to include pending messages for all consumers. The minimum ID from which to read the stream of pending messages. The method will default to reading from the beginning of the stream. The maximum ID to read to within the stream of pending messages. The method will default to reading to the end of the stream. The flags to use for this operation. An instance of for each pending message. Equivalent of calling XPENDING key group start-id end-id count consumer-name. Read a stream using the given range of IDs. The key of the stream. The minimum ID from which to read the stream. The method will default to reading from the beginning of the stream. The maximum ID to read to within the stream. The method will default to reading to the end of the stream. The maximum number of messages to return. The order of the messages. will execute XRANGE and will execute XREVRANGE. The flags to use for this operation. Returns an instance of for each message returned. Read from a single stream. The key of the stream. The position from which to read the stream. The maximum number of messages to return. The flags to use for this operation. Returns an instance of for each message returned. Equivalent of calling XREAD COUNT num STREAMS key id. Read from multiple streams. Array of streams and the positions from which to begin reading for each stream. The maximum number of messages to return from each stream. The flags to use for this operation. A value of for each stream. Equivalent of calling XREAD COUNT num STREAMS key1 key2 id1 id2. Read messages from a stream into an associated consumer group. The key of the stream. The name of the consumer group. The consumer name. The position from which to read the stream. Defaults to when . The maximum number of messages to return. The flags to use for this operation. Returns a value of for each message returned. Read messages from a stream into an associated consumer group. The key of the stream. The name of the consumer group. The consumer name. The position from which to read the stream. Defaults to when . The maximum number of messages to return. When true, the message will not be added to the pending message list. The flags to use for this operation. Returns a value of for each message returned. Read from multiple streams into the given consumer group. The consumer group with the given will need to have been created for each stream prior to calling this method. Array of streams and the positions from which to begin reading for each stream. The name of the consumer group. The maximum number of messages to return from each stream. The flags to use for this operation. A value of for each stream. Equivalent of calling XREADGROUP GROUP groupName consumerName COUNT countPerStream STREAMS stream1 stream2 id1 id2. Read from multiple streams into the given consumer group. The consumer group with the given will need to have been created for each stream prior to calling this method. Array of streams and the positions from which to begin reading for each stream. The name of the consumer group. The maximum number of messages to return from each stream. When true, the message will not be added to the pending message list. The flags to use for this operation. A value of for each stream. Equivalent of calling XREADGROUP GROUP groupName consumerName COUNT countPerStream STREAMS stream1 stream2 id1 id2. Trim the stream to a specified maximum length. The key of the stream. The maximum length of the stream. If true, the "~" argument is used to allow the stream to exceed max length by a small number. This improves performance when removing messages. The flags to use for this operation. The number of messages removed from the stream. If key already exists and is a string, this command appends the value at the end of the string. If key does not exist it is created and set as an empty string, so APPEND will be similar to SET in this special case. The key of the string. The value to append to the string. The flags to use for this operation. The length of the string after the append operation. Count the number of set bits (population counting) in a string. By default all the bytes contained in the string are examined. It is possible to specify the counting operation only in an interval passing the additional arguments start and end. Like for the GETRANGE command start and end can contain negative values in order to index bytes starting from the end of the string, where -1 is the last byte, -2 is the penultimate, and so forth. The key of the string. The start byte to count at. The end byte to count at. In Redis 7+, we can choose if and specify a bit index or byte index (defaults to ). The flags to use for this operation. The number of bits set to 1. Perform a bitwise operation between multiple keys (containing string values) and store the result in the destination key. The BITOP command supports four bitwise operations; note that NOT is a unary operator: the second key should be omitted in this case and only the first key will be considered. The result of the operation is always stored at . The operation to perform. The destination key to store the result in. The first key to get the bit value from. The second key to get the bit value from. The flags to use for this operation. The size of the string stored in the destination key, that is equal to the size of the longest input string. Perform a bitwise operation between multiple keys (containing string values) and store the result in the destination key. The BITOP command supports four bitwise operations; note that NOT is a unary operator. The result of the operation is always stored at . The operation to perform. The destination key to store the result in. The keys to get the bit values from. The flags to use for this operation. The size of the string stored in the destination key, that is equal to the size of the longest input string. Return the position of the first bit set to 1 or 0 in a string. The position is returned thinking at the string as an array of bits from left to right where the first byte most significant bit is at position 0, the second byte most significant bit is at position 8 and so forth. A and may be specified - these are in bytes, not bits. and can contain negative values in order to index bytes starting from the end of the string, where -1 is the last byte, -2 is the penultimate, and so forth. The key of the string. True to check for the first 1 bit, false to check for the first 0 bit. The position to start looking (defaults to 0). The position to stop looking (defaults to -1, unlimited). In Redis 7+, we can choose if and specify a bit index or byte index (defaults to ). The flags to use for this operation. The command returns the position of the first bit set to 1 or 0 according to the request. If we look for set bits(the bit argument is 1) and the string is empty or composed of just zero bytes, -1 is returned. Decrements the number stored at key by decrement. If the key does not exist, it is set to 0 before performing the operation. An error is returned if the key contains a value of the wrong type or contains a string that is not representable as integer. This operation is limited to 64 bit signed integers. The key of the string. The amount to decrement by (defaults to 1). The flags to use for this operation. The value of key after the decrement. , Decrements the string representing a floating point number stored at key by the specified decrement. If the key does not exist, it is set to 0 before performing the operation. The precision of the output is fixed at 17 digits after the decimal point regardless of the actual internal precision of the computation. The key of the string. The amount to decrement by (defaults to 1). The flags to use for this operation. The value of key after the decrement. Get the value of key. If the key does not exist the special value nil is returned. An error is returned if the value stored at key is not a string, because GET only handles string values. The key of the string. The flags to use for this operation. The value of key, or nil when key does not exist. Returns the values of all specified keys. For every key that does not hold a string value or does not exist, the special value nil is returned. The keys of the strings. The flags to use for this operation. The values of the strings with nil for keys do not exist. Get the value of key. If the key does not exist the special value nil is returned. An error is returned if the value stored at key is not a string, because GET only handles string values. The key of the string. The flags to use for this operation. The value of key, or nil when key does not exist. Returns the bit value at offset in the string value stored at key. When offset is beyond the string length, the string is assumed to be a contiguous space with 0 bits. The key of the string. The offset in the string to get a bit at. The flags to use for this operation. The bit value stored at offset. Returns the substring of the string value stored at key, determined by the offsets start and end (both are inclusive). Negative offsets can be used in order to provide an offset starting from the end of the string. So -1 means the last character, -2 the penultimate and so forth. The key of the string. The start index of the substring to get. The end index of the substring to get. The flags to use for this operation. The substring of the string value stored at key. Atomically sets key to value and returns the old value stored at key. The key of the string. The value to replace the existing value with. The flags to use for this operation. The old value stored at key, or nil when key did not exist. Gets the value of and update its (relative) expiry. If the key does not exist, the result will be . The key of the string. The expiry to set. will remove expiry. The flags to use for this operation. The value of key, or nil when key does not exist. Gets the value of and update its (absolute) expiry. If the key does not exist, the result will be . The key of the string. The exact date and time to expire at. will remove expiry. The flags to use for this operation. The value of key, or nil when key does not exist. Get the value of key and delete the key. If the key does not exist the special value nil is returned. An error is returned if the value stored at key is not a string, because GET only handles string values. The key of the string. The flags to use for this operation. The value of key, or nil when key does not exist. Get the value of key. If the key does not exist the special value nil is returned. An error is returned if the value stored at key is not a string, because GET only handles string values. The key of the string. The flags to use for this operation. The value of key and its expiry, or nil when key does not exist. Increments the number stored at key by increment. If the key does not exist, it is set to 0 before performing the operation. An error is returned if the key contains a value of the wrong type or contains a string that is not representable as integer. This operation is limited to 64 bit signed integers. The key of the string. The amount to increment by (defaults to 1). The flags to use for this operation. The value of key after the increment. , Increments the string representing a floating point number stored at key by the specified increment. If the key does not exist, it is set to 0 before performing the operation. The precision of the output is fixed at 17 digits after the decimal point regardless of the actual internal precision of the computation. The key of the string. The amount to increment by (defaults to 1). The flags to use for this operation. The value of key after the increment. Returns the length of the string value stored at key. The key of the string. The flags to use for this operation. The length of the string at key, or 0 when key does not exist. Implements the longest common subsequence algorithm between the values at and , returning a string containing the common sequence. Note that this is different than the longest common string algorithm, since matching characters in the string does not need to be contiguous. The key of the first string. The key of the second string. The flags to use for this operation. A string (sequence of characters) of the LCS match. Implements the longest common subsequence algorithm between the values at and , returning the legnth of the common sequence. Note that this is different than the longest common string algorithm, since matching characters in the string does not need to be contiguous. The key of the first string. The key of the second string. The flags to use for this operation. The length of the LCS match. Implements the longest common subsequence algorithm between the values at and , returning a list of all common sequences. Note that this is different than the longest common string algorithm, since matching characters in the string does not need to be contiguous. The key of the first string. The key of the second string. Can be used to restrict the list of matches to the ones of a given minimum length. The flags to use for this operation. The result of LCS algorithm, based on the given parameters. Set key to hold the string value. If key already holds a value, it is overwritten, regardless of its type. The key of the string. The value to set. The expiry to set. Whether to maintain the existing key's TTL (KEEPTTL flag). Which condition to set the value under (defaults to always). The flags to use for this operation. if the string was set, otherwise. Sets the given keys to their respective values. If is specified, this will not perform any operation at all even if just a single key already exists. The keys and values to set. Which condition to set the value under (defaults to always). The flags to use for this operation. if the keys were set, otherwise. , Atomically sets key to value and returns the previous value (if any) stored at . The key of the string. The value to set. The expiry to set. Which condition to set the value under (defaults to ). The flags to use for this operation. The previous value stored at , or nil when key did not exist. This method uses the SET command with the GET option introduced in Redis 6.2.0 instead of the deprecated GETSET command. Atomically sets key to value and returns the previous value (if any) stored at . The key of the string. The value to set. The expiry to set. Whether to maintain the existing key's TTL (KEEPTTL flag). Which condition to set the value under (defaults to ). The flags to use for this operation. The previous value stored at , or nil when key did not exist. This method uses the SET command with the GET option introduced in Redis 6.2.0 instead of the deprecated GETSET command. Sets or clears the bit at offset in the string value stored at key. The bit is either set or cleared depending on value, which can be either 0 or 1. When key does not exist, a new string value is created.The string is grown to make sure it can hold a bit at offset. The key of the string. The offset in the string to set . The bit value to set, true for 1, false for 0. The flags to use for this operation. The original bit value stored at offset. Overwrites part of the string stored at key, starting at the specified offset, for the entire length of value. If the offset is larger than the current length of the string at key, the string is padded with zero-bytes to make offset fit. Non-existing keys are considered as empty strings, so this command will make sure it holds a string large enough to be able to set value at offset. The key of the string. The offset in the string to overwrite. The value to overwrite with. The flags to use for this operation. The length of the string after it was modified by the command. Describes functionality that is common to both standalone redis servers and redis clusters. Indicates whether the instance can communicate with the server (resolved using the supplied key and optional flags). The key to check for. The flags to use for this operation. Atomically transfer a key from a source Redis instance to a destination Redis instance. On success the key is deleted from the original instance by default, and is guaranteed to exist in the target instance. The key to migrate. The server to migrate the key to. The database to migrate the key to. The timeout to use for the transfer. The options to use for this migration. The flags to use for this operation. Returns the raw DEBUG OBJECT output for a key. This command is not fully documented and should be avoided unless you have good reason, and then avoided anyway. The key to debug. The flags to use for this migration. The raw output from DEBUG OBJECT. Add the specified member to the set stored at key. Specified members that are already a member of this set are ignored. If key does not exist, a new set is created before adding the specified members. The key of the set. The longitude of geo entry. The latitude of the geo entry. The value to set at this entry. The flags to use for this operation. if the specified member was not already present in the set, else . Add the specified member to the set stored at key. Specified members that are already a member of this set are ignored. If key does not exist, a new set is created before adding the specified members. The key of the set. The geo value to store. The flags to use for this operation. if the specified member was not already present in the set, else . Add the specified members to the set stored at key. Specified members that are already a member of this set are ignored. If key does not exist, a new set is created before adding the specified members. The key of the set. The geo values add to the set. The flags to use for this operation. The number of elements that were added to the set, not including all the elements already present into the set. Removes the specified member from the geo sorted set stored at key. Non existing members are ignored. The key of the set. The geo value to remove. The flags to use for this operation. if the member existed in the sorted set and was removed, else . Return the distance between two members in the geospatial index represented by the sorted set. The key of the set. The first member to check. The second member to check. The unit of distance to return (defaults to meters). The flags to use for this operation. The command returns the distance as a double (represented as a string) in the specified unit, or if one or both the elements are missing. Return valid Geohash strings representing the position of one or more elements in a sorted set value representing a geospatial index (where elements were added using GEOADD). The key of the set. The members to get. The flags to use for this operation. The command returns an array where each element is the Geohash corresponding to each member name passed as argument to the command. Return valid Geohash strings representing the position of one or more elements in a sorted set value representing a geospatial index (where elements were added using GEOADD). The key of the set. The member to get. The flags to use for this operation. The command returns an array where each element is the Geohash corresponding to each member name passed as argument to the command. Return the positions (longitude,latitude) of all the specified members of the geospatial index represented by the sorted set at key. The key of the set. The members to get. The flags to use for this operation. The command returns an array where each element is a two elements array representing longitude and latitude (x,y) of each member name passed as argument to the command. Non existing elements are reported as NULL elements of the array. Return the positions (longitude,latitude) of all the specified members of the geospatial index represented by the sorted set at key. The key of the set. The member to get. The flags to use for this operation. The command returns an array where each element is a two elements array representing longitude and latitude (x,y) of each member name passed as argument to the command. Non existing elements are reported as NULL elements of the array. Return the members of a sorted set populated with geospatial information using GEOADD, which are within the borders of the area specified with the center location and the maximum distance from the center (the radius). The key of the set. The member to get a radius of results from. The radius to check. The unit of (defaults to meters). The count of results to get, -1 for unlimited. The order of the results. The search options to use. The flags to use for this operation. The results found within the radius, if any. Return the members of a sorted set populated with geospatial information using GEOADD, which are within the borders of the area specified with the center location and the maximum distance from the center (the radius). The key of the set. The longitude of the point to get a radius of results from. The latitude of the point to get a radius of results from. The radius to check. The unit of (defaults to meters). The count of results to get, -1 for unlimited. The order of the results. The search options to use. The flags to use for this operation. The results found within the radius, if any. Return the members of the geo-encoded sorted set stored at bounded by the provided , centered at the provided set . The key of the set. The set member to use as the center of the shape. The shape to use to bound the geo search. The maximum number of results to pull back. Whether or not to terminate the search after finding results. Must be true of count is -1. The order to sort by (defaults to unordered). The search options to use. The flags for this operation. The results found within the shape, if any. Return the members of the geo-encoded sorted set stored at bounded by the provided , centered at the point provided by the and . The key of the set. The longitude of the center point. The latitude of the center point. The shape to use to bound the geo search. The maximum number of results to pull back. Whether or not to terminate the search after finding results. Must be true of count is -1. The order to sort by (defaults to unordered). The search options to use. The flags for this operation. The results found within the shape, if any. Stores the members of the geo-encoded sorted set stored at bounded by the provided , centered at the provided set . The key of the set. The key to store the result at. The set member to use as the center of the shape. The shape to use to bound the geo search. The maximum number of results to pull back. Whether or not to terminate the search after finding results. Must be true of count is -1. The order to sort by (defaults to unordered). If set to true, the resulting set will be a regular sorted-set containing only distances, rather than a geo-encoded sorted-set. The flags for this operation. The size of the set stored at . Stores the members of the geo-encoded sorted set stored at bounded by the provided , centered at the point provided by the and . The key of the set. The key to store the result at. The longitude of the center point. The latitude of the center point. The shape to use to bound the geo search. The maximum number of results to pull back. Whether or not to terminate the search after finding results. Must be true of count is -1. The order to sort by (defaults to unordered). If set to true, the resulting set will be a regular sorted-set containing only distances, rather than a geo-encoded sorted-set. The flags for this operation. The size of the set stored at . Decrements the number stored at field in the hash stored at key by decrement. If key does not exist, a new key holding a hash is created. If field does not exist the value is set to 0 before the operation is performed. The key of the hash. The field in the hash to decrement. The amount to decrement by. The flags to use for this operation. The value at field after the decrement operation. The range of values supported by HINCRBY is limited to 64 bit signed integers. Decrement the specified field of an hash stored at key, and representing a floating point number, by the specified decrement. If the field does not exist, it is set to 0 before performing the operation. The key of the hash. The field in the hash to decrement. The amount to decrement by. The flags to use for this operation. The value at field after the decrement operation. The precision of the output is fixed at 17 digits after the decimal point regardless of the actual internal precision of the computation. Removes the specified fields from the hash stored at key. Non-existing fields are ignored. Non-existing keys are treated as empty hashes and this command returns 0. The key of the hash. The field in the hash to delete. The flags to use for this operation. if the field was removed. Removes the specified fields from the hash stored at key. Non-existing fields are ignored. Non-existing keys are treated as empty hashes and this command returns 0. The key of the hash. The fields in the hash to delete. The flags to use for this operation. The number of fields that were removed. Returns if field is an existing field in the hash stored at key. The key of the hash. The field in the hash to check. The flags to use for this operation. if the hash contains field, if the hash does not contain field, or key does not exist. Returns the value associated with field in the hash stored at key. The key of the hash. The field in the hash to get. The flags to use for this operation. The value associated with field, or nil when field is not present in the hash or key does not exist. Returns the value associated with field in the hash stored at key. The key of the hash. The field in the hash to get. The flags to use for this operation. The value associated with field, or nil when field is not present in the hash or key does not exist. Returns the values associated with the specified fields in the hash stored at key. For every field that does not exist in the hash, a nil value is returned.Because a non-existing keys are treated as empty hashes, running HMGET against a non-existing key will return a list of nil values. The key of the hash. The fields in the hash to get. The flags to use for this operation. List of values associated with the given fields, in the same order as they are requested. Returns all fields and values of the hash stored at key. The key of the hash to get all entries from. The flags to use for this operation. List of fields and their values stored in the hash, or an empty list when key does not exist. Increments the number stored at field in the hash stored at key by increment. If key does not exist, a new key holding a hash is created. If field does not exist the value is set to 0 before the operation is performed. The key of the hash. The field in the hash to increment. The amount to increment by. The flags to use for this operation. The value at field after the increment operation. The range of values supported by HINCRBY is limited to 64 bit signed integers. Increment the specified field of an hash stored at key, and representing a floating point number, by the specified increment. If the field does not exist, it is set to 0 before performing the operation. The key of the hash. The field in the hash to increment. The amount to increment by. The flags to use for this operation. The value at field after the increment operation. The precision of the output is fixed at 17 digits after the decimal point regardless of the actual internal precision of the computation. Returns all field names in the hash stored at key. The key of the hash. The flags to use for this operation. List of fields in the hash, or an empty list when key does not exist. Returns the number of fields contained in the hash stored at key. The key of the hash. The flags to use for this operation. The number of fields in the hash, or 0 when key does not exist. Gets a random field from the hash at . The key of the hash. The flags to use for this operation. A random hash field name or if the hash does not exist. Gets field names from the hash at . The key of the hash. The number of fields to return. The flags to use for this operation. An array of hash field names of size of at most , or if the hash does not exist. Gets field names and values from the hash at . The key of the hash. The number of fields to return. The flags to use for this operation. An array of hash entries of size of at most , or if the hash does not exist. The HSCAN command is used to incrementally iterate over a hash. Note: to resume an iteration via cursor, cast the original enumerable or enumerator to . The key of the hash. The pattern of keys to get entries for. The page size to iterate by. The cursor position to start at. The page offset to start at. The flags to use for this operation. Yields all elements of the hash matching the pattern. Sets the specified fields to their respective values in the hash stored at key. This command overwrites any specified fields that already exist in the hash, leaving other unspecified fields untouched. If key does not exist, a new key holding a hash is created. The key of the hash. The entries to set in the hash. The flags to use for this operation. Sets field in the hash stored at key to value. If key does not exist, a new key holding a hash is created. If field already exists in the hash, it is overwritten. The key of the hash. The field to set in the hash. The value to set. Which conditions under which to set the field value (defaults to always). The flags to use for this operation. if field is a new field in the hash and value was set, if field already exists in the hash and the value was updated. , Returns the string length of the value associated with field in the hash stored at key. The key of the hash. The field containing the string The flags to use for this operation. The length of the string at field, or 0 when key does not exist. Returns all values in the hash stored at key. The key of the hash. The flags to use for this operation. List of values in the hash, or an empty list when key does not exist. Adds the element to the HyperLogLog data structure stored at the variable name specified as first argument. The key of the hyperloglog. The value to add. The flags to use for this operation. if at least 1 HyperLogLog internal register was altered, otherwise. Adds all the element arguments to the HyperLogLog data structure stored at the variable name specified as first argument. The key of the hyperloglog. The values to add. The flags to use for this operation. if at least 1 HyperLogLog internal register was altered, otherwise. Returns the approximated cardinality computed by the HyperLogLog data structure stored at the specified variable, or 0 if the variable does not exist. The key of the hyperloglog. The flags to use for this operation. The approximated number of unique elements observed via HyperLogLogAdd. Returns the approximated cardinality of the union of the HyperLogLogs passed, by internally merging the HyperLogLogs stored at the provided keys into a temporary hyperLogLog, or 0 if the variable does not exist. The keys of the hyperloglogs. The flags to use for this operation. The approximated number of unique elements observed via HyperLogLogAdd. Merge multiple HyperLogLog values into an unique value that will approximate the cardinality of the union of the observed Sets of the source HyperLogLog structures. The key of the merged hyperloglog. The key of the first hyperloglog to merge. The key of the first hyperloglog to merge. The flags to use for this operation. Merge multiple HyperLogLog values into an unique value that will approximate the cardinality of the union of the observed Sets of the source HyperLogLog structures. The key of the merged hyperloglog. The keys of the hyperloglogs to merge. The flags to use for this operation. Indicate exactly which redis server we are talking to. The key to check. The flags to use for this operation. The endpoint serving the key. Copies the value from the to the specified . The key of the source value to copy. The destination key to copy the source to. The database ID to store in. If default (-1), current database is used. Whether to overwrite an existing values at . If and the key exists, the copy will not succeed. The flags to use for this operation. if key was copied. if key was not copied. Removes the specified key. A key is ignored if it does not exist. If UNLINK is available (Redis 4.0+), it will be used. The key to delete. The flags to use for this operation. if the key was removed. , Removes the specified keys. A key is ignored if it does not exist. If UNLINK is available (Redis 4.0+), it will be used. The keys to delete. The flags to use for this operation. The number of keys that were removed. , Serialize the value stored at key in a Redis-specific format and return it to the user. The returned value can be synthesized back into a Redis key using the RESTORE command. The key to dump. The flags to use for this operation. The serialized value. Returns the internal encoding for the Redis object stored at . The key to dump. The flags to use for this operation. The Redis encoding for the value or is the key does not exist. Returns if key exists. The key to check. The flags to use for this operation. if the key exists. if the key does not exist. Indicates how many of the supplied keys exists. The keys to check. The flags to use for this operation. The number of keys that existed. Set a timeout on . After the timeout has expired, the key will automatically be deleted. A key with an associated timeout is said to be volatile in Redis terminology. The key to set the expiration for. The timeout to set. The flags to use for this operation. if the timeout was set. if key does not exist or the timeout could not be set. If key is updated before the timeout has expired, then the timeout is removed as if the PERSIST command was invoked on key. For Redis versions < 2.1.3, existing timeouts cannot be overwritten. So, if key already has an associated timeout, it will do nothing and return 0. Since Redis 2.1.3, you can update the timeout of a key. It is also possible to remove the timeout using the PERSIST command. See the page on key expiry for more information. , , Set a timeout on . After the timeout has expired, the key will automatically be deleted. A key with an associated timeout is said to be volatile in Redis terminology. The key to set the expiration for. The timeout to set. In Redis 7+, we choose under which condition the expiration will be set using . The flags to use for this operation. if the timeout was set. if key does not exist or the timeout could not be set. , Set a timeout on . After the timeout has expired, the key will automatically be deleted. A key with an associated timeout is said to be volatile in Redis terminology. The key to set the expiration for. The exact date to expiry to set. The flags to use for this operation. if the timeout was set. if key does not exist or the timeout could not be set. If key is updated before the timeout has expired, then the timeout is removed as if the PERSIST command was invoked on key. For Redis versions < 2.1.3, existing timeouts cannot be overwritten. So, if key already has an associated timeout, it will do nothing and return 0. Since Redis 2.1.3, you can update the timeout of a key. It is also possible to remove the timeout using the PERSIST command. See the page on key expiry for more information. , , Set a timeout on . After the timeout has expired, the key will automatically be deleted. A key with an associated timeout is said to be volatile in Redis terminology. The key to set the expiration for. The timeout to set. In Redis 7+, we choose under which condition the expiration will be set using . The flags to use for this operation. if the timeout was set. if key does not exist or the timeout could not be set. , Returns the absolute time at which the given will expire, if it exists and has an expiration. The key to get the expiration for. The flags to use for this operation. The time at which the given key will expire, or if the key does not exist or has no associated expiration time. , Returns the logarithmic access frequency counter of the object stored at . The command is only available when the maxmemory-policy configuration directive is set to one of the LFU policies. The key to get a frequency count for. The flags to use for this operation. The number of logarithmic access frequency counter, ( if the key does not exist). Returns the time since the object stored at the specified key is idle (not requested by read or write operations). The key to get the time of. The flags to use for this operation. The time since the object stored at the specified key is idle. Move key from the currently selected database (see SELECT) to the specified destination database. When key already exists in the destination database, or it does not exist in the source database, it does nothing. It is possible to use MOVE as a locking primitive because of this. The key to move. The database to move the key to. The flags to use for this operation. if key was moved. if key was not moved. Remove the existing timeout on key, turning the key from volatile (a key with an expire set) to persistent (a key that will never expire as no timeout is associated). The key to persist. The flags to use for this operation. if the timeout was removed. if key does not exist or does not have an associated timeout. Return a random key from the currently selected database. The flags to use for this operation. The random key, or nil when the database is empty. Returns the reference count of the object stored at . The key to get a reference count for. The flags to use for this operation. The number of references ( if the key does not exist). Renames to . It returns an error when the source and destination names are the same, or when key does not exist. The key to rename. The key to rename to. What conditions to rename under (defaults to always). The flags to use for this operation. if the key was renamed, otherwise. , Create a key associated with a value that is obtained by deserializing the provided serialized value (obtained via DUMP). If is 0 the key is created without any expire, otherwise the specified expire time (in milliseconds) is set. The key to restore. The value of the key. The expiry to set. The flags to use for this operation. Returns the remaining time to live of a key that has a timeout. This introspection capability allows a Redis client to check how many seconds a given key will continue to be part of the dataset. The key to check. The flags to use for this operation. TTL, or nil when key does not exist or does not have a timeout. Alters the last access time of a key. The key to touch. The flags to use for this operation. if the key was touched, otherwise. Alters the last access time of the specified . A key is ignored if it does not exist. The keys to touch. The flags to use for this operation. The number of keys that were touched. Returns the string representation of the type of the value stored at key. The different types that can be returned are: string, list, set, zset and hash. The key to get the type of. The flags to use for this operation. Type of key, or none when key does not exist. Returns the element at index in the list stored at key. The index is zero-based, so 0 means the first element, 1 the second element and so on. Negative indices can be used to designate elements starting at the tail of the list. Here, -1 means the last element, -2 means the penultimate and so forth. The key of the list. The index position to get the value at. The flags to use for this operation. The requested element, or nil when index is out of range. Inserts value in the list stored at key either before or after the reference value pivot. When key does not exist, it is considered an empty list and no operation is performed. The key of the list. The value to insert after. The value to insert. The flags to use for this operation. The length of the list after the insert operation, or -1 when the value pivot was not found. Inserts value in the list stored at key either before or after the reference value pivot. When key does not exist, it is considered an empty list and no operation is performed. The key of the list. The value to insert before. The value to insert. The flags to use for this operation. The length of the list after the insert operation, or -1 when the value pivot was not found. Removes and returns the first element of the list stored at key. The key of the list. The flags to use for this operation. The value of the first element, or nil when key does not exist. Removes and returns count elements from the head of the list stored at key. If the list contains less than count elements, removes and returns the number of elements in the list. The key of the list. The number of elements to remove The flags to use for this operation. Array of values that were popped, or nil if the key doesn't exist. Removes and returns at most elements from the first non-empty list in . Starts on the left side of the list. The keys to look through for elements to pop. The maximum number of elements to pop from the list. The flags to use for this operation. A span of contiguous elements from the list, or if no non-empty lists are found. Scans through the list stored at looking for , returning the 0-based index of the first matching element. The key of the list. The element to search for. The rank of the first element to return, within the sub-list of matching indexes in the case of multiple matches. The maximum number of elements to scan through before stopping, defaults to 0 (a full scan of the list.) The flags to use for this operation. The 0-based index of the first matching element, or -1 if not found. Scans through the list stored at looking for instances of , returning the 0-based indexes of any matching elements. The key of the list. The element to search for. The number of matches to find. A count of 0 will return the indexes of all occurrences of the element. The rank of the first element to return, within the sub-list of matching indexes in the case of multiple matches. The maximum number of elements to scan through before stopping, defaults to 0 (a full scan of the list.) The flags to use for this operation. An array of at most of indexes of matching elements. If none are found, and empty array is returned. Insert the specified value at the head of the list stored at key. If key does not exist, it is created as empty list before performing the push operations. The key of the list. The value to add to the head of the list. Which conditions to add to the list under (defaults to always). The flags to use for this operation. The length of the list after the push operations. , Insert the specified value at the head of the list stored at key. If key does not exist, it is created as empty list before performing the push operations. The key of the list. The value to add to the head of the list. Which conditions to add to the list under (defaults to always). The flags to use for this operation. The length of the list after the push operations. , Insert all the specified values at the head of the list stored at key. If key does not exist, it is created as empty list before performing the push operations. Elements are inserted one after the other to the head of the list, from the leftmost element to the rightmost element. So for instance the command LPUSH mylist a b c will result into a list containing c as first element, b as second element and a as third element. The key of the list. The values to add to the head of the list. The flags to use for this operation. The length of the list after the push operations. Returns the length of the list stored at key. If key does not exist, it is interpreted as an empty list and 0 is returned. The key of the list. The flags to use for this operation. The length of the list at key. Returns and removes the first or last element of the list stored at , and pushes the element as the first or last element of the list stored at . The key of the list to remove from. The key of the list to move to. What side of the list to remove from. What side of the list to move to. The flags to use for this operation. The element being popped and pushed or if there is no element to move. Returns the specified elements of the list stored at key. The offsets start and stop are zero-based indexes, with 0 being the first element of the list (the head of the list), 1 being the next element and so on. These offsets can also be negative numbers indicating offsets starting at the end of the list.For example, -1 is the last element of the list, -2 the penultimate, and so on. Note that if you have a list of numbers from 0 to 100, LRANGE list 0 10 will return 11 elements, that is, the rightmost item is included. The key of the list. The start index of the list. The stop index of the list. The flags to use for this operation. List of elements in the specified range. Removes the first count occurrences of elements equal to value from the list stored at key. The count argument influences the operation in the following ways: count > 0: Remove elements equal to value moving from head to tail. count < 0: Remove elements equal to value moving from tail to head. count = 0: Remove all elements equal to value. The key of the list. The value to remove from the list. The count behavior (see method summary). The flags to use for this operation. The number of removed elements. Removes and returns the last element of the list stored at key. The key of the list. The flags to use for this operation. The element being popped. Removes and returns count elements from the end the list stored at key. If the list contains less than count elements, removes and returns the number of elements in the list. The key of the list. The number of elements to pop The flags to use for this operation. Array of values that were popped, or nil if the key doesn't exist. Removes and returns at most elements from the first non-empty list in . Starts on the right side of the list. The keys to look through for elements to pop. The maximum number of elements to pop from the list. The flags to use for this operation. A span of contiguous elements from the list, or if no non-empty lists are found. Atomically returns and removes the last element (tail) of the list stored at source, and pushes the element at the first element (head) of the list stored at destination. The key of the source list. The key of the destination list. The flags to use for this operation. The element being popped and pushed. Insert the specified value at the tail of the list stored at key. If key does not exist, it is created as empty list before performing the push operation. The key of the list. The value to add to the tail of the list. Which conditions to add to the list under. The flags to use for this operation. The length of the list after the push operation. , Insert the specified value at the tail of the list stored at key. If key does not exist, it is created as empty list before performing the push operation. The key of the list. The values to add to the tail of the list. Which conditions to add to the list under. The flags to use for this operation. The length of the list after the push operation. , Insert all the specified values at the tail of the list stored at key. If key does not exist, it is created as empty list before performing the push operation. Elements are inserted one after the other to the tail of the list, from the leftmost element to the rightmost element. So for instance the command RPUSH mylist a b c will result into a list containing a as first element, b as second element and c as third element. The key of the list. The values to add to the tail of the list. The flags to use for this operation. The length of the list after the push operation. Sets the list element at index to value. For more information on the index argument, see . An error is returned for out of range indexes. The key of the list. The index to set the value at. The values to add to the list. The flags to use for this operation. Trim an existing list so that it will contain only the specified range of elements specified. Both start and stop are zero-based indexes, where 0 is the first element of the list (the head), 1 the next element and so on. For example: LTRIM foobar 0 2 will modify the list stored at foobar so that only the first three elements of the list will remain. start and end can also be negative numbers indicating offsets from the end of the list, where -1 is the last element of the list, -2 the penultimate element and so on. The key of the list. The start index of the list to trim to. The end index of the list to trim to. The flags to use for this operation. Extends a lock, if the token value is correct. The key of the lock. The value to set at the key. The expiration of the lock key. The flags to use for this operation. if the lock was successfully extended. Queries the token held against a lock. The key of the lock. The flags to use for this operation. The current value of the lock, if any. Releases a lock, if the token value is correct. The key of the lock. The value at the key that must match. The flags to use for this operation. if the lock was successfully released, otherwise. Takes a lock (specifying a token value) if it is not already taken. The key of the lock. The value to set at the key. The expiration of the lock key. The flags to use for this operation. if the lock was successfully taken, otherwise. Posts a message to the given channel. The channel to publish to. The message to send. The flags to use for this operation. The number of clients that received the message *on the destination server*, note that this doesn't mean much in a cluster as clients can get the message through other nodes. Execute an arbitrary command against the server; this is primarily intended for executing modules, but may also be used to provide access to new features that lack a direct API. The command to run. The arguments to pass for the command. A dynamic representation of the command's result. This API should be considered an advanced feature; inappropriate use can be harmful. Execute an arbitrary command against the server; this is primarily intended for executing modules, but may also be used to provide access to new features that lack a direct API. The command to run. The arguments to pass for the command. The flags to use for this operation. A dynamic representation of the command's result. This API should be considered an advanced feature; inappropriate use can be harmful. Execute a Lua script against the server. The script to execute. The keys to execute against. The values to execute against. The flags to use for this operation. A dynamic representation of the script's result. , Execute a Lua script against the server using just the SHA1 hash. The hash of the script to execute. The keys to execute against. The values to execute against. The flags to use for this operation. A dynamic representation of the script's result. Be aware that this method is not resilient to Redis server restarts. Use instead. Execute a lua script against the server, using previously prepared script. Named parameters, if any, are provided by the `parameters` object. The script to execute. The parameters to pass to the script. The flags to use for this operation. A dynamic representation of the script's result. Execute a lua script against the server, using previously prepared and loaded script. This method sends only the SHA1 hash of the lua script to Redis. Named parameters, if any, are provided by the `parameters` object. The already-loaded script to execute. The parameters to pass to the script. The flags to use for this operation. A dynamic representation of the script's result. Read-only variant of the EVAL command that cannot execute commands that modify data, Execute a Lua script against the server. The script to execute. The keys to execute against. The values to execute against. The flags to use for this operation. A dynamic representation of the script's result. , Read-only variant of the EVALSHA command that cannot execute commands that modify data, Execute a Lua script against the server using just the SHA1 hash. The hash of the script to execute. The keys to execute against. The values to execute against. The flags to use for this operation. A dynamic representation of the script's result. Add the specified member to the set stored at key. Specified members that are already a member of this set are ignored. If key does not exist, a new set is created before adding the specified members. The key of the set. The value to add to the set. The flags to use for this operation. if the specified member was not already present in the set, else . Add the specified members to the set stored at key. Specified members that are already a member of this set are ignored. If key does not exist, a new set is created before adding the specified members. The key of the set. The values to add to the set. The flags to use for this operation. The number of elements that were added to the set, not including all the elements already present into the set. Returns the members of the set resulting from the specified operation against the given sets. The operation to perform. The key of the first set. The key of the second set. The flags to use for this operation. List with members of the resulting set. , , Returns the members of the set resulting from the specified operation against the given sets. The operation to perform. The keys of the sets to operate on. The flags to use for this operation. List with members of the resulting set. , , This command is equal to SetCombine, but instead of returning the resulting set, it is stored in destination. If destination already exists, it is overwritten. The operation to perform. The key of the destination set. The key of the first set. The key of the second set. The flags to use for this operation. The number of elements in the resulting set. , , This command is equal to SetCombine, but instead of returning the resulting set, it is stored in destination. If destination already exists, it is overwritten. The operation to perform. The key of the destination set. The keys of the sets to operate on. The flags to use for this operation. The number of elements in the resulting set. , , Returns whether is a member of the set stored at . The key of the set. The value to check for. The flags to use for this operation. if the element is a member of the set. if the element is not a member of the set, or if key does not exist. Returns whether each of is a member of the set stored at . The key of the set. The members to check for. The flags to use for this operation. if the element is a member of the set. if the element is not a member of the set, or if key does not exist. Returns the set cardinality (number of elements) of the intersection between the sets stored at the given . If the intersection cardinality reaches partway through the computation, the algorithm will exit and yield as the cardinality. The keys of the sets. The number of elements to check (defaults to 0 and means unlimited). The flags to use for this operation. The cardinality (number of elements) of the set, or 0 if key does not exist. Returns the set cardinality (number of elements) of the set stored at key. The key of the set. The flags to use for this operation. The cardinality (number of elements) of the set, or 0 if key does not exist. Returns all the members of the set value stored at key. The key of the set. The flags to use for this operation. All elements of the set. Move member from the set at source to the set at destination. This operation is atomic. In every given moment the element will appear to be a member of source or destination for other clients. When the specified element already exists in the destination set, it is only removed from the source set. The key of the source set. The key of the destination set. The value to move. The flags to use for this operation. if the element is moved. if the element is not a member of source and no operation was performed. Removes and returns a random element from the set value stored at key. The key of the set. The flags to use for this operation. The removed element, or nil when key does not exist. Removes and returns the specified number of random elements from the set value stored at key. The key of the set. The number of elements to return. The flags to use for this operation. An array of elements, or an empty array when key does not exist. Return a random element from the set value stored at . The key of the set. The flags to use for this operation. The randomly selected element, or when does not exist. Return an array of count distinct elements if count is positive. If called with a negative count the behavior changes and the command is allowed to return the same element multiple times. In this case the number of returned elements is the absolute value of the specified count. The key of the set. The count of members to get. The flags to use for this operation. An array of elements, or an empty array when does not exist. Remove the specified member from the set stored at key. Specified members that are not a member of this set are ignored. The key of the set. The value to remove. The flags to use for this operation. if the specified member was already present in the set, otherwise. Remove the specified members from the set stored at key. Specified members that are not a member of this set are ignored. The key of the set. The values to remove. The flags to use for this operation. The number of members that were removed from the set, not including non existing members. The SSCAN command is used to incrementally iterate over set. Note: to resume an iteration via cursor, cast the original enumerable or enumerator to . The key of the set. The pattern to match. The page size to iterate by. The cursor position to start at. The page offset to start at. The flags to use for this operation. Yields all matching elements of the set. Sorts a list, set or sorted set (numerically or alphabetically, ascending by default). By default, the elements themselves are compared, but the values can also be used to perform external key-lookups using the by parameter. By default, the elements themselves are returned, but external key-lookups (one or many) can be performed instead by specifying the get parameter (note that # specifies the element itself, when used in get). Referring to the redis SORT documentation for examples is recommended. When used in hashes, by and get can be used to specify fields using -> notation (again, refer to redis documentation). Uses SORT_RO when possible. The key of the list, set, or sorted set. How many entries to skip on the return. How many entries to take on the return. The ascending or descending order (defaults to ascending). The sorting method (defaults to numeric). The key pattern to sort by, if any. e.g. ExternalKey_* would sort by ExternalKey_{listvalue} as a lookup. The key pattern to sort by, if any e.g. ExternalKey_* would return the value of ExternalKey_{listvalue} for each entry. The flags to use for this operation. The sorted elements, or the external values if get is specified. , Sorts a list, set or sorted set (numerically or alphabetically, ascending by default). By default, the elements themselves are compared, but the values can also be used to perform external key-lookups using the by parameter. By default, the elements themselves are returned, but external key-lookups (one or many) can be performed instead by specifying the get parameter (note that # specifies the element itself, when used in get). Referring to the redis SORT documentation for examples is recommended. When used in hashes, by and get can be used to specify fields using -> notation (again, refer to redis documentation). The destination key to store results in. The key of the list, set, or sorted set. How many entries to skip on the return. How many entries to take on the return. The ascending or descending order (defaults to ascending). The sorting method (defaults to numeric). The key pattern to sort by, if any. e.g. ExternalKey_* would sort by ExternalKey_{listvalue} as a lookup. The key pattern to sort by, if any e.g. ExternalKey_* would return the value of ExternalKey_{listvalue} for each entry. The flags to use for this operation. The number of elements stored in the new list. Adds the specified member with the specified score to the sorted set stored at key. If the specified member is already a member of the sorted set, the score is updated and the element reinserted at the right position to ensure the correct ordering. The key of the sorted set. The member to add to the sorted set. The score for the member to add to the sorted set. What conditions to add the element under (defaults to always). The flags to use for this operation. if the value was added. if it already existed (the score is still updated). Adds all the specified members with the specified scores to the sorted set stored at key. If a specified member is already a member of the sorted set, the score is updated and the element reinserted at the right position to ensure the correct ordering. The key of the sorted set. The members and values to add to the sorted set. What conditions to add the element under (defaults to always). The flags to use for this operation. The number of elements added to the sorted sets, not including elements already existing for which the score was updated. Computes a set operation for multiple sorted sets (optionally using per-set ), optionally performing a specific aggregation (defaults to ). cannot be used with weights or aggregation. The operation to perform. The keys of the sorted sets. The optional weights per set that correspond to . The aggregation method (defaults to ). The flags to use for this operation. The resulting sorted set. , , Computes a set operation for multiple sorted sets (optionally using per-set ), optionally performing a specific aggregation (defaults to ). cannot be used with weights or aggregation. The operation to perform. The keys of the sorted sets. The optional weights per set that correspond to . The aggregation method (defaults to ). The flags to use for this operation. The resulting sorted set with scores. , , Computes a set operation over two sorted sets, and stores the result in destination, optionally performing a specific aggregation (defaults to sum). cannot be used with aggregation. The operation to perform. The key to store the results in. The key of the first sorted set. The key of the second sorted set. The aggregation method (defaults to sum). The flags to use for this operation. The number of elements in the resulting sorted set at destination. , , Computes a set operation over multiple sorted sets (optionally using per-set weights), and stores the result in destination, optionally performing a specific aggregation (defaults to sum). cannot be used with aggregation. The operation to perform. The key to store the results in. The keys of the sorted sets. The optional weights per set that correspond to . The aggregation method (defaults to sum). The flags to use for this operation. The number of elements in the resulting sorted set at destination. , , Decrements the score of member in the sorted set stored at key by decrement. If member does not exist in the sorted set, it is added with -decrement as its score (as if its previous score was 0.0). The key of the sorted set. The member to decrement. The amount to decrement by. The flags to use for this operation. The new score of member. Increments the score of member in the sorted set stored at key by increment. If member does not exist in the sorted set, it is added with increment as its score (as if its previous score was 0.0). The key of the sorted set. The member to increment. The amount to increment by. The flags to use for this operation. The new score of member. Returns the cardinality of the intersection of the sorted sets at . The keys of the sorted sets. If the intersection cardinality reaches partway through the computation, the algorithm will exit and yield as the cardinality (defaults to 0 meaning unlimited). The flags to use for this operation. The number of elements in the resulting intersection. Returns the sorted set cardinality (number of elements) of the sorted set stored at key. The key of the sorted set. The min score to filter by (defaults to negative infinity). The max score to filter by (defaults to positive infinity). Whether to exclude and from the range check (defaults to both inclusive). The flags to use for this operation. The cardinality (number of elements) of the sorted set, or 0 if key does not exist. When all the elements in a sorted set are inserted with the same score, in order to force lexicographical ordering. This command returns the number of elements in the sorted set at key with a value between min and max. The key of the sorted set. The min value to filter by. The max value to filter by. Whether to exclude and from the range check (defaults to both inclusive). The flags to use for this operation. The number of elements in the specified score range. Returns a random element from the sorted set value stored at . The key of the sorted set. The flags to use for this operation. The randomly selected element, or when does not exist. Returns an array of random elements from the sorted set value stored at . The key of the sorted set. If the provided count argument is positive, returns an array of distinct elements. The array's length is either or the sorted set's cardinality (ZCARD), whichever is lower. If called with a negative count, the behavior changes and the command is allowed to return the same element multiple times. In this case, the number of returned elements is the absolute value of the specified count. The flags to use for this operation. The randomly selected elements, or an empty array when does not exist. Returns an array of random elements from the sorted set value stored at . The key of the sorted set. If the provided count argument is positive, returns an array of distinct elements. The array's length is either or the sorted set's cardinality (ZCARD), whichever is lower. If called with a negative count, the behavior changes and the command is allowed to return the same element multiple times. In this case, the number of returned elements is the absolute value of the specified count. The flags to use for this operation. The randomly selected elements with scores, or an empty array when does not exist. Returns the specified range of elements in the sorted set stored at key. By default the elements are considered to be ordered from the lowest to the highest score. Lexicographical order is used for elements with equal score. Both start and stop are zero-based indexes, where 0 is the first element, 1 is the next element and so on. They can also be negative numbers indicating offsets from the end of the sorted set, with -1 being the last element of the sorted set, -2 the penultimate element and so on. The key of the sorted set. The start index to get. The stop index to get. The order to sort by (defaults to ascending). The flags to use for this operation. List of elements in the specified range. , Takes the specified range of elements in the sorted set of the and stores them in a new sorted set at the . The sorted set to take the range from. Where the resulting set will be stored. The starting point in the sorted set. If is , this should be a string. The stopping point in the range of the sorted set. If is , this should be a string. The ordering criteria to use for the range. Choices are , , and (defaults to ). Whether to exclude and from the range check (defaults to both inclusive). The direction to consider the and in. If , the must be smaller than the . If , must be smaller than . The number of elements into the sorted set to skip. Note: this iterates after sorting so incurs O(n) cost for large values. The maximum number of elements to pull into the new () set. The flags to use for this operation. The cardinality of (number of elements in) the newly created sorted set. Returns the specified range of elements in the sorted set stored at key. By default the elements are considered to be ordered from the lowest to the highest score. Lexicographical order is used for elements with equal score. Both start and stop are zero-based indexes, where 0 is the first element, 1 is the next element and so on. They can also be negative numbers indicating offsets from the end of the sorted set, with -1 being the last element of the sorted set, -2 the penultimate element and so on. The key of the sorted set. The start index to get. The stop index to get. The order to sort by (defaults to ascending). The flags to use for this operation. List of elements in the specified range. , Returns the specified range of elements in the sorted set stored at key. By default the elements are considered to be ordered from the lowest to the highest score. Lexicographical order is used for elements with equal score. Start and stop are used to specify the min and max range for score values. Similar to other range methods the values are inclusive. The key of the sorted set. The minimum score to filter by. The maximum score to filter by. Which of and to exclude (defaults to both inclusive). The order to sort by (defaults to ascending). How many items to skip. How many items to take. The flags to use for this operation. List of elements in the specified score range. , Returns the specified range of elements in the sorted set stored at key. By default the elements are considered to be ordered from the lowest to the highest score. Lexicographical order is used for elements with equal score. Start and stop are used to specify the min and max range for score values. Similar to other range methods the values are inclusive. The key of the sorted set. The minimum score to filter by. The maximum score to filter by. Which of and to exclude (defaults to both inclusive). The order to sort by (defaults to ascending). How many items to skip. How many items to take. The flags to use for this operation. List of elements in the specified score range. , When all the elements in a sorted set are inserted with the same score, in order to force lexicographical ordering. This command returns all the elements in the sorted set at key with a value between min and max. The key of the sorted set. The min value to filter by. The max value to filter by. Which of and to exclude (defaults to both inclusive). How many items to skip. How many items to take. The flags to use for this operation. List of elements in the specified score range. When all the elements in a sorted set are inserted with the same score, in order to force lexicographical ordering. This command returns all the elements in the sorted set at key with a value between min and max. The key of the sorted set. The min value to filter by. The max value to filter by. Which of and to exclude (defaults to both inclusive). Whether to order the data ascending or descending How many items to skip. How many items to take. The flags to use for this operation. List of elements in the specified score range. , Returns the rank of member in the sorted set stored at key, by default with the scores ordered from low to high. The rank (or index) is 0-based, which means that the member with the lowest score has rank 0. The key of the sorted set. The member to get the rank of. The order to sort by (defaults to ascending). The flags to use for this operation. If member exists in the sorted set, the rank of member. If member does not exist in the sorted set or key does not exist, . , Removes the specified member from the sorted set stored at key. Non existing members are ignored. The key of the sorted set. The member to remove. The flags to use for this operation. if the member existed in the sorted set and was removed. otherwise. Removes the specified members from the sorted set stored at key. Non existing members are ignored. The key of the sorted set. The members to remove. The flags to use for this operation. The number of members removed from the sorted set, not including non existing members. Removes all elements in the sorted set stored at key with rank between start and stop. Both start and stop are 0 -based indexes with 0 being the element with the lowest score. These indexes can be negative numbers, where they indicate offsets starting at the element with the highest score. For example: -1 is the element with the highest score, -2 the element with the second highest score and so forth. The key of the sorted set. The minimum rank to remove. The maximum rank to remove. The flags to use for this operation. The number of elements removed. Removes all elements in the sorted set stored at key with a score between min and max (inclusive by default). The key of the sorted set. The minimum score to remove. The maximum score to remove. Which of and to exclude (defaults to both inclusive). The flags to use for this operation. The number of elements removed. When all the elements in a sorted set are inserted with the same score, in order to force lexicographical ordering. This command removes all elements in the sorted set stored at key between the lexicographical range specified by min and max. The key of the sorted set. The minimum value to remove. The maximum value to remove. Which of and to exclude (defaults to both inclusive). The flags to use for this operation. The number of elements removed. The ZSCAN command is used to incrementally iterate over a sorted set. The key of the sorted set. The pattern to match. The page size to iterate by. The cursor position to start at. The page offset to start at. The flags to use for this operation. Yields all matching elements of the sorted set. Returns the score of member in the sorted set at key. If member does not exist in the sorted set, or key does not exist, nil is returned. The key of the sorted set. The member to get a score for. The flags to use for this operation. The score of the member. Returns the scores of members in the sorted set at . If a member does not exist in the sorted set, or key does not exist, is returned. The key of the sorted set. The members to get a score for. The flags to use for this operation. The scores of the members in the same order as the array. If a member does not exist in the set, is returned. Same as but return the number of the elements changed. The key of the sorted set. The member to add/update to the sorted set. The score for the member to add/update to the sorted set. What conditions to add the element under (defaults to always). The flags to use for this operation. The number of elements changed. Same as but return the number of the elements changed. The key of the sorted set. The members and values to add/update to the sorted set. What conditions to add the element under (defaults to always). The flags to use for this operation. The number of elements changed. Removes and returns the first element from the sorted set stored at key, by default with the scores ordered from low to high. The key of the sorted set. The order to sort by (defaults to ascending). The flags to use for this operation. The removed element, or nil when key does not exist. , Removes and returns the specified number of first elements from the sorted set stored at key, by default with the scores ordered from low to high. The key of the sorted set. The number of elements to return. The order to sort by (defaults to ascending). The flags to use for this operation. An array of elements, or an empty array when key does not exist. , Removes and returns up to entries from the first non-empty sorted set in . Returns if none of the sets exist or contain any elements. The keys to check. The maximum number of records to pop out of the sorted set. The order to sort by when popping items out of the set. The flags to use for the operation. A contiguous collection of sorted set entries with the key they were popped from, or if no non-empty sorted sets are found. Allow the consumer to mark a pending message as correctly processed. Returns the number of messages acknowledged. The key of the stream. The name of the consumer group that received the message. The ID of the message to acknowledge. The flags to use for this operation. The number of messages acknowledged. Allow the consumer to mark a pending message as correctly processed. Returns the number of messages acknowledged. The key of the stream. The name of the consumer group that received the message. The IDs of the messages to acknowledge. The flags to use for this operation. The number of messages acknowledged. Adds an entry using the specified values to the given stream key. If key does not exist, a new key holding a stream is created. The command returns the ID of the newly created stream entry. The key of the stream. The field name for the stream entry. The value to set in the stream entry. The ID to assign to the stream entry, defaults to an auto-generated ID ("*"). The maximum length of the stream. If true, the "~" argument is used to allow the stream to exceed max length by a small number. This improves performance when removing messages. The flags to use for this operation. The ID of the newly created message. Adds an entry using the specified values to the given stream key. If key does not exist, a new key holding a stream is created. The command returns the ID of the newly created stream entry. The key of the stream. The fields and their associated values to set in the stream entry. The ID to assign to the stream entry, defaults to an auto-generated ID ("*"). The maximum length of the stream. If true, the "~" argument is used to allow the stream to exceed max length by a small number. This improves performance when removing messages. The flags to use for this operation. The ID of the newly created message. Change ownership of messages consumed, but not yet acknowledged, by a different consumer. Messages that have been idle for more than will be claimed. The key of the stream. The consumer group. The consumer claiming the messages(s). The minimum idle time threshold for pending messages to be claimed. The starting ID to scan for pending messages that have an idle time greater than . The upper limit of the number of entries that the command attempts to claim. If , Redis will default the value to 100. The flags to use for this operation. An instance of . Change ownership of messages consumed, but not yet acknowledged, by a different consumer. Messages that have been idle for more than will be claimed. The result will contain the claimed message IDs instead of a instance. The key of the stream. The consumer group. The consumer claiming the messages(s). The minimum idle time threshold for pending messages to be claimed. The starting ID to scan for pending messages that have an idle time greater than . The upper limit of the number of entries that the command attempts to claim. If , Redis will default the value to 100. The flags to use for this operation. An instance of . Change ownership of messages consumed, but not yet acknowledged, by a different consumer. This method returns the complete message for the claimed message(s). The key of the stream. The consumer group. The consumer claiming the given message(s). The minimum message idle time to allow the reassignment of the message(s). The IDs of the messages to claim for the given consumer. The flags to use for this operation. The messages successfully claimed by the given consumer. Change ownership of messages consumed, but not yet acknowledged, by a different consumer. This method returns the IDs for the claimed message(s). The key of the stream. The consumer group. The consumer claiming the given message(s). The minimum message idle time to allow the reassignment of the message(s). The IDs of the messages to claim for the given consumer. The flags to use for this operation. The message IDs for the messages successfully claimed by the given consumer. Set the position from which to read a stream for a consumer group. The key of the stream. The name of the consumer group. The position from which to read for the consumer group. The flags to use for this operation. if successful, otherwise. Retrieve information about the consumers for the given consumer group. This is the equivalent of calling "XINFO GROUPS key group". The key of the stream. The consumer group name. The flags to use for this operation. An instance of for each of the consumer group's consumers. Create a consumer group for the given stream. The key of the stream. The name of the group to create. The position to begin reading the stream. Defaults to . The flags to use for this operation. if the group was created, otherwise. Create a consumer group for the given stream. The key of the stream. The name of the group to create. The position to begin reading the stream. Defaults to . Create the stream if it does not already exist. The flags to use for this operation. if the group was created, otherwise. Delete messages in the stream. This method does not delete the stream. The key of the stream. The IDs of the messages to delete. The flags to use for this operation. Returns the number of messages successfully deleted from the stream. Delete a consumer from a consumer group. The key of the stream. The name of the consumer group. The name of the consumer. The flags to use for this operation. The number of messages that were pending for the deleted consumer. Delete a consumer group. The key of the stream. The name of the consumer group. The flags to use for this operation. if deleted, otherwise. Retrieve information about the groups created for the given stream. This is the equivalent of calling "XINFO GROUPS key". The key of the stream. The flags to use for this operation. An instance of for each of the stream's groups. Retrieve information about the given stream. This is the equivalent of calling "XINFO STREAM key". The key of the stream. The flags to use for this operation. A instance with information about the stream. Return the number of entries in a stream. The key of the stream. The flags to use for this operation. The number of entries inside the given stream. View information about pending messages for a stream. A pending message is a message read using StreamReadGroup (XREADGROUP) but not yet acknowledged. The key of the stream. The name of the consumer group The flags to use for this operation. An instance of . contains the number of pending messages. The highest and lowest ID of the pending messages, and the consumers with their pending message count. The equivalent of calling XPENDING key group. View information about each pending message. The key of the stream. The name of the consumer group. The maximum number of pending messages to return. The consumer name for the pending messages. Pass RedisValue.Null to include pending messages for all consumers. The minimum ID from which to read the stream of pending messages. The method will default to reading from the beginning of the stream. The maximum ID to read to within the stream of pending messages. The method will default to reading to the end of the stream. The flags to use for this operation. An instance of for each pending message. Equivalent of calling XPENDING key group start-id end-id count consumer-name. Read a stream using the given range of IDs. The key of the stream. The minimum ID from which to read the stream. The method will default to reading from the beginning of the stream. The maximum ID to read to within the stream. The method will default to reading to the end of the stream. The maximum number of messages to return. The order of the messages. will execute XRANGE and will execute XREVRANGE. The flags to use for this operation. Returns an instance of for each message returned. Read from a single stream. The key of the stream. The position from which to read the stream. The maximum number of messages to return. The flags to use for this operation. Returns an instance of for each message returned. Equivalent of calling XREAD COUNT num STREAMS key id. Read from multiple streams. Array of streams and the positions from which to begin reading for each stream. The maximum number of messages to return from each stream. The flags to use for this operation. A value of for each stream. Equivalent of calling XREAD COUNT num STREAMS key1 key2 id1 id2. Read messages from a stream into an associated consumer group. The key of the stream. The name of the consumer group. The consumer name. The position from which to read the stream. Defaults to when . The maximum number of messages to return. The flags to use for this operation. Returns a value of for each message returned. Read messages from a stream into an associated consumer group. The key of the stream. The name of the consumer group. The consumer name. The position from which to read the stream. Defaults to when . The maximum number of messages to return. When true, the message will not be added to the pending message list. The flags to use for this operation. Returns a value of for each message returned. Read from multiple streams into the given consumer group. The consumer group with the given will need to have been created for each stream prior to calling this method. Array of streams and the positions from which to begin reading for each stream. The name of the consumer group. The maximum number of messages to return from each stream. The flags to use for this operation. A value of for each stream. Equivalent of calling XREADGROUP GROUP groupName consumerName COUNT countPerStream STREAMS stream1 stream2 id1 id2. Read from multiple streams into the given consumer group. The consumer group with the given will need to have been created for each stream prior to calling this method. Array of streams and the positions from which to begin reading for each stream. The name of the consumer group. The maximum number of messages to return from each stream. When true, the message will not be added to the pending message list. The flags to use for this operation. A value of for each stream. Equivalent of calling XREADGROUP GROUP groupName consumerName COUNT countPerStream STREAMS stream1 stream2 id1 id2. Trim the stream to a specified maximum length. The key of the stream. The maximum length of the stream. If true, the "~" argument is used to allow the stream to exceed max length by a small number. This improves performance when removing messages. The flags to use for this operation. The number of messages removed from the stream. If key already exists and is a string, this command appends the value at the end of the string. If key does not exist it is created and set as an empty string, so APPEND will be similar to SET in this special case. The key of the string. The value to append to the string. The flags to use for this operation. The length of the string after the append operation. Count the number of set bits (population counting) in a string. By default all the bytes contained in the string are examined. It is possible to specify the counting operation only in an interval passing the additional arguments start and end. Like for the GETRANGE command start and end can contain negative values in order to index bytes starting from the end of the string, where -1 is the last byte, -2 is the penultimate, and so forth. The key of the string. The start byte to count at. The end byte to count at. In Redis 7+, we can choose if and specify a bit index or byte index (defaults to ). The flags to use for this operation. The number of bits set to 1. Perform a bitwise operation between multiple keys (containing string values) and store the result in the destination key. The BITOP command supports four bitwise operations; note that NOT is a unary operator: the second key should be omitted in this case and only the first key will be considered. The result of the operation is always stored at . The operation to perform. The destination key to store the result in. The first key to get the bit value from. The second key to get the bit value from. The flags to use for this operation. The size of the string stored in the destination key, that is equal to the size of the longest input string. Perform a bitwise operation between multiple keys (containing string values) and store the result in the destination key. The BITOP command supports four bitwise operations; note that NOT is a unary operator. The result of the operation is always stored at . The operation to perform. The destination key to store the result in. The keys to get the bit values from. The flags to use for this operation. The size of the string stored in the destination key, that is equal to the size of the longest input string. Return the position of the first bit set to 1 or 0 in a string. The position is returned thinking at the string as an array of bits from left to right where the first byte most significant bit is at position 0, the second byte most significant bit is at position 8 and so forth. A and may be specified - these are in bytes, not bits. and can contain negative values in order to index bytes starting from the end of the string, where -1 is the last byte, -2 is the penultimate, and so forth. The key of the string. True to check for the first 1 bit, false to check for the first 0 bit. The position to start looking (defaults to 0). The position to stop looking (defaults to -1, unlimited). In Redis 7+, we can choose if and specify a bit index or byte index (defaults to ). The flags to use for this operation. The command returns the position of the first bit set to 1 or 0 according to the request. If we look for set bits(the bit argument is 1) and the string is empty or composed of just zero bytes, -1 is returned. Decrements the number stored at key by decrement. If the key does not exist, it is set to 0 before performing the operation. An error is returned if the key contains a value of the wrong type or contains a string that is not representable as integer. This operation is limited to 64 bit signed integers. The key of the string. The amount to decrement by (defaults to 1). The flags to use for this operation. The value of key after the decrement. , Decrements the string representing a floating point number stored at key by the specified decrement. If the key does not exist, it is set to 0 before performing the operation. The precision of the output is fixed at 17 digits after the decimal point regardless of the actual internal precision of the computation. The key of the string. The amount to decrement by (defaults to 1). The flags to use for this operation. The value of key after the decrement. Get the value of key. If the key does not exist the special value nil is returned. An error is returned if the value stored at key is not a string, because GET only handles string values. The key of the string. The flags to use for this operation. The value of key, or nil when key does not exist. Returns the values of all specified keys. For every key that does not hold a string value or does not exist, the special value nil is returned. The keys of the strings. The flags to use for this operation. The values of the strings with nil for keys do not exist. Get the value of key. If the key does not exist the special value nil is returned. An error is returned if the value stored at key is not a string, because GET only handles string values. The key of the string. The flags to use for this operation. The value of key, or nil when key does not exist. Returns the bit value at offset in the string value stored at key. When offset is beyond the string length, the string is assumed to be a contiguous space with 0 bits. The key of the string. The offset in the string to get a bit at. The flags to use for this operation. The bit value stored at offset. Returns the substring of the string value stored at key, determined by the offsets start and end (both are inclusive). Negative offsets can be used in order to provide an offset starting from the end of the string. So -1 means the last character, -2 the penultimate and so forth. The key of the string. The start index of the substring to get. The end index of the substring to get. The flags to use for this operation. The substring of the string value stored at key. Atomically sets key to value and returns the old value stored at key. The key of the string. The value to replace the existing value with. The flags to use for this operation. The old value stored at key, or nil when key did not exist. Gets the value of and update its (relative) expiry. If the key does not exist, the result will be . The key of the string. The expiry to set. will remove expiry. The flags to use for this operation. The value of key, or nil when key does not exist. Gets the value of and update its (absolute) expiry. If the key does not exist, the result will be . The key of the string. The exact date and time to expire at. will remove expiry. The flags to use for this operation. The value of key, or nil when key does not exist. Get the value of key and delete the key. If the key does not exist the special value nil is returned. An error is returned if the value stored at key is not a string, because GET only handles string values. The key of the string. The flags to use for this operation. The value of key, or nil when key does not exist. Get the value of key. If the key does not exist the special value nil is returned. An error is returned if the value stored at key is not a string, because GET only handles string values. The key of the string. The flags to use for this operation. The value of key and its expiry, or nil when key does not exist. Increments the number stored at key by increment. If the key does not exist, it is set to 0 before performing the operation. An error is returned if the key contains a value of the wrong type or contains a string that is not representable as integer. This operation is limited to 64 bit signed integers. The key of the string. The amount to increment by (defaults to 1). The flags to use for this operation. The value of key after the increment. , Increments the string representing a floating point number stored at key by the specified increment. If the key does not exist, it is set to 0 before performing the operation. The precision of the output is fixed at 17 digits after the decimal point regardless of the actual internal precision of the computation. The key of the string. The amount to increment by (defaults to 1). The flags to use for this operation. The value of key after the increment. Returns the length of the string value stored at key. The key of the string. The flags to use for this operation. The length of the string at key, or 0 when key does not exist. Implements the longest common subsequence algorithm between the values at and , returning a string containing the common sequence. Note that this is different than the longest common string algorithm, since matching characters in the string does not need to be contiguous. The key of the first string. The key of the second string. The flags to use for this operation. A string (sequence of characters) of the LCS match. Implements the longest common subsequence algorithm between the values at and , returning the legnth of the common sequence. Note that this is different than the longest common string algorithm, since matching characters in the string does not need to be contiguous. The key of the first string. The key of the second string. The flags to use for this operation. The length of the LCS match. Implements the longest common subsequence algorithm between the values at and , returning a list of all common sequences. Note that this is different than the longest common string algorithm, since matching characters in the string does not need to be contiguous. The key of the first string. The key of the second string. Can be used to restrict the list of matches to the ones of a given minimum length. The flags to use for this operation. The result of LCS algorithm, based on the given parameters. Set key to hold the string value. If key already holds a value, it is overwritten, regardless of its type. The key of the string. The value to set. The expiry to set. Whether to maintain the existing key's TTL (KEEPTTL flag). Which condition to set the value under (defaults to always). The flags to use for this operation. if the string was set, otherwise. Sets the given keys to their respective values. If is specified, this will not perform any operation at all even if just a single key already exists. The keys and values to set. Which condition to set the value under (defaults to always). The flags to use for this operation. if the keys were set, otherwise. , Atomically sets key to value and returns the previous value (if any) stored at . The key of the string. The value to set. The expiry to set. Which condition to set the value under (defaults to ). The flags to use for this operation. The previous value stored at , or nil when key did not exist. This method uses the SET command with the GET option introduced in Redis 6.2.0 instead of the deprecated GETSET command. Atomically sets key to value and returns the previous value (if any) stored at . The key of the string. The value to set. The expiry to set. Whether to maintain the existing key's TTL (KEEPTTL flag). Which condition to set the value under (defaults to ). The flags to use for this operation. The previous value stored at , or nil when key did not exist. This method uses the SET command with the GET option introduced in Redis 6.2.0 instead of the deprecated GETSET command. Sets or clears the bit at offset in the string value stored at key. The bit is either set or cleared depending on value, which can be either 0 or 1. When key does not exist, a new string value is created.The string is grown to make sure it can hold a bit at offset. The key of the string. The offset in the string to set . The bit value to set, true for 1, false for 0. The flags to use for this operation. The original bit value stored at offset. Overwrites part of the string stored at key, starting at the specified offset, for the entire length of value. If the offset is larger than the current length of the string at key, the string is padded with zero-bytes to make offset fit. Non-existing keys are considered as empty strings, so this command will make sure it holds a string large enough to be able to set value at offset. The key of the string. The offset in the string to overwrite. The value to overwrite with. The flags to use for this operation. The length of the string after it was modified by the command. Describes retry policy functionality that can be provided to the multiplexer to be used for connection reconnects. This method is called by the multiplexer to determine if a reconnect operation can be retried now. The number of times reconnect retries have already been made by the multiplexer while it was in connecting state. Total time elapsed in milliseconds since the last reconnect retry was made. Common operations available to all redis connections. This command is often used to test if a connection is still alive, or to measure latency. The command flags to use when pinging. The observed latency. Common operations available to all redis connections. Gets the multiplexer that created this instance. This command is often used to test if a connection is still alive, or to measure latency. The command flags to use. The observed latency. Wait for a given asynchronous operation to complete (or timeout), reporting which. The task to wait on. Wait for a given asynchronous operation to complete (or timeout). The task to wait on. Wait for a given asynchronous operation to complete (or timeout). The type of task to wait on. The task to wait on. Wait for the given asynchronous operations to complete (or timeout). The tasks to wait on. Represents a resumable, cursor-based scanning operation. Returns the cursor that represents the *active* page of results (not the pending/next page of results as returned by SCAN/HSCAN/ZSCAN/SSCAN). The page size of the current operation. The offset into the current page. Provides configuration controls of a redis server. Gets the cluster configuration associated with this server, if known. Gets the address of the connected server. Gets the features available to the connected server. Gets whether the connection to the server is active and usable. The protocol being used to communicate with this server (if not connected/known, then the anticipated protocol from the configuration is returned, assuming success) Gets whether the connected server is a replica. Gets whether the connected server is a replica. Explicitly opt in for replica writes on writable replica. Explicitly opt in for replica writes on writable replica. Gets the operating mode of the connected server. Gets the version of the connected server. The number of databases supported on this server. The CLIENT KILL command closes a given client connection identified by ip:port. The ip:port should match a line returned by the CLIENT LIST command. Due to the single-threaded nature of Redis, it is not possible to kill a client connection while it is executing a command. From the client point of view, the connection can never be closed in the middle of the execution of a command. However, the client will notice the connection has been closed only when the next command is sent (and results in network error). The endpoint of the client to kill. The command flags to use. The CLIENT KILL command closes multiple connections that match the specified filters. The ID of the client to kill. The type of client. The endpoint to kill. Whether to skip the current connection. The command flags to use. the number of clients killed. The CLIENT LIST command returns information and statistics about the client connections server in a mostly human readable format. The command flags to use. Obtains the current CLUSTER NODES output from a cluster server. The command flags to use. Obtains the current raw CLUSTER NODES output from a cluster server. The command flags to use. Get all configuration parameters matching the specified pattern. The pattern of config values to get. The command flags to use. All matching configuration parameters. Resets the statistics reported by Redis using the INFO command. The command flags to use. The CONFIG REWRITE command rewrites the redis.conf file the server was started with, applying the minimal changes needed to make it reflecting the configuration currently used by the server, that may be different compared to the original one because of the use of the CONFIG SET command. The command flags to use. The CONFIG SET command is used in order to reconfigure the server at runtime without the need to restart Redis. You can change both trivial parameters or switch from one to another persistence option using this command. The setting name. The new setting value. The command flags to use. Returns the number of total commands available in this Redis server. The command flags to use. Returns list of keys from a full Redis command. The command to get keys from. The command flags to use. Returns a list of command names available on this Redis server. Only one of the filter options is usable at a time. The module name to filter the command list by. The category to filter the command list by. The pattern to filter the command list by. The command flags to use. Return the number of keys in the database. The database ID. The command flags to use. Return the same message passed in. The message to echo. The command flags to use. Execute an arbitrary command against the server; this is primarily intended for executing modules, but may also be used to provide access to new features that lack a direct API. The command to run. The arguments to pass for the command. A dynamic representation of the command's result. This API should be considered an advanced feature; inappropriate use can be harmful. Execute an arbitrary command against the server; this is primarily intended for executing modules, but may also be used to provide access to new features that lack a direct API. The command to run. The arguments to pass for the command. The flags to use for this operation. A dynamic representation of the command's result. This API should be considered an advanced feature; inappropriate use can be harmful. Delete all the keys of all databases on the server. The command flags to use. Delete all the keys of the database. The database ID. The command flags to use. Get summary statistics associates with this server. The INFO command returns information and statistics about the server in a format that is simple to parse by computers and easy to read by humans. The info section to get, if getting a specific one. The command flags to use. A grouping of key/value pairs, grouped by their section header. The INFO command returns information and statistics about the server in a format that is simple to parse by computers and easy to read by humans. The info section to get, if getting a specific one. The command flags to use. The entire raw INFO string. Returns all keys matching . The KEYS or SCAN commands will be used based on the server capabilities. Note: to resume an iteration via cursor, cast the original enumerable or enumerator to . The database ID. The pattern to use. The page size to iterate by. The cursor position to resume at. The page offset to start at. The command flags to use. An enumeration of matching redis keys. Warning: consider KEYS as a command that should only be used in production environments with extreme care. , Return the time of the last DB save executed with success. A client may check if a BGSAVE command succeeded reading the LASTSAVE value, then issuing a BGSAVE command and checking at regular intervals every N seconds if LASTSAVE changed. The command flags to use. The last time a save was performed. Promote the selected node to be primary. The options to use for this topology change. The log to write output to. Returns the role info for the current server. Explicitly request the database to persist the current state to disk. The method of the save (e.g. background or foreground). The command flags to use. , , , Indicates whether the specified script is defined on the server. The text of the script to check for on the server. The command flags to use. Indicates whether the specified script hash is defined on the server. The SHA1 of the script to check for on the server. The command flags to use. Removes all cached scripts on this server. The command flags to use. Explicitly defines a script on the server. The script to load. The command flags to use. The SHA1 of the loaded script. Explicitly defines a script on the server. The script to load. The command flags to use. The loaded script, ready for rapid reuse based on the SHA1. Asks the redis server to shutdown, killing all connections. Please FULLY read the notes on the SHUTDOWN command. The mode of the shutdown. The command flags to use. The REPLICAOF command can change the replication settings of a replica on the fly. If a Redis server is already acting as replica, specifying a null primary will turn off the replication, turning the Redis server into a PRIMARY. Specifying a non-null primary will make the server a replica of another server listening at the specified hostname and port. Endpoint of the new primary to replicate from. The command flags to use. To read the slow log the SLOWLOG GET command is used, that returns every entry in the slow log. It is possible to return only the N most recent entries passing an additional argument to the command (for instance SLOWLOG GET 10). The count of items to get. The command flags to use. The slow command traces as recorded by the Redis server. You can reset the slow log using the SLOWLOG RESET command. Once deleted the information is lost forever. The command flags to use. Lists the currently active channels. An active channel is a Pub/Sub channel with one ore more subscribers (not including clients subscribed to patterns). The channel name pattern to get channels for. The command flags to use. a list of active channels, optionally matching the specified pattern. Returns the number of subscriptions to patterns (that are performed using the PSUBSCRIBE command). Note that this is not just the count of clients subscribed to patterns but the total number of patterns all the clients are subscribed to. The command flags to use. the number of patterns all the clients are subscribed to. Returns the number of subscribers (not counting clients subscribed to patterns) for the specified channel. The channel to get a subscriber count for. The command flags to use. The number of subscribers on this server. Swaps two Redis databases, so that immediately all the clients connected to a given database will see the data of the other database, and the other way around. The ID of the first database. The ID of the second database. The command flags to use. The TIME command returns the current server time in UTC format. Use the method to get local time. The command flags to use. The server's current time. Gets a text-based latency diagnostic. The full text result of latency doctor. , Resets the given events (or all if none are specified), discarding the currently logged latency spike events, and resetting the maximum event time register. The number of events that were reset. , Fetch raw latency data from the event time series, as timestamp-latency pairs. An array of latency history entries. , Fetch raw latency data from the event time series, as timestamp-latency pairs. An array of the latest latency history entries. , Reports about different memory-related issues that the Redis server experiences, and advises about possible remedies. The full text result of memory doctor. Attempts to purge dirty pages so these can be reclaimed by the allocator. Returns an array reply about the memory usage of the server. An array reply of memory stat metrics and values. Provides an internal statistics report from the memory allocator. The full text result of memory allocation stats. Returns the IP and port number of the primary with that name. If a failover is in progress or terminated successfully for this primary it returns the address and port of the promoted replica. The sentinel service name. The command flags to use. The primary IP and port. Returns the IP and port numbers of all known Sentinels for the given service name. The sentinel service name. The command flags to use. A list of the sentinel IPs and ports. Returns the IP and port numbers of all known Sentinel replicas for the given service name. The sentinel service name. The command flags to use. A list of the replica IPs and ports. Show the state and info of the specified primary. The sentinel service name. The command flags to use. The primaries state as KeyValuePairs. Show a list of monitored primaries and their state. The command flags to use. An array of primaries state KeyValuePair arrays. Show a list of replicas for this primary, and their state. The sentinel service name. The command flags to use. An array of replica state KeyValuePair arrays. Force a failover as if the primary was not reachable, and without asking for agreement to other Sentinels (however a new version of the configuration will be published so that the other Sentinels will update their configurations). The sentinel service name. The command flags to use. Show a list of sentinels for a primary, and their state. The sentinel service name. The command flags to use. For testing only: Break the connection without mercy or thought The server to simulate failure on. The type of failure(s) to simulate. A redis connection used as the subscriber in a pub/sub scenario. Indicate exactly which redis server we are talking to. The channel to identify the server endpoint by. The command flags to use. Indicates whether the instance can communicate with the server. If a channel is specified, the existing subscription map is queried to resolve the server responsible for that subscription - otherwise the server is chosen arbitrarily from the primaries. The channel to identify the server endpoint by. if connected, otherwise. Posts a message to the given channel. The channel to publish to. The message to publish. The command flags to use. The number of clients that received the message *on the destination server*, note that this doesn't mean much in a cluster as clients can get the message through other nodes. Subscribe to perform some operation when a message to the preferred/active node is broadcast, without any guarantee of ordered handling. The channel to subscribe to. The handler to invoke when a message is received on . The command flags to use. , Subscribe to perform some operation when a message to the preferred/active node is broadcast, as a queue that guarantees ordered handling. The redis channel to subscribe to. The command flags to use. A channel that represents this source , Indicate to which redis server we are actively subscribed for a given channel. The channel to check which server endpoint was subscribed on. The subscribed endpoint for the given , if the channel is not actively subscribed. Unsubscribe from a specified message channel. Note: if no handler is specified, the subscription is canceled regardless of the subscribers. If a handler is specified, the subscription is only canceled if this handler is the last handler remaining against the channel. The channel that was subscribed to. The handler to no longer invoke when a message is received on . The command flags to use. , Unsubscribe all subscriptions on this instance. The command flags to use. , Represents a group of operations that will be sent to the server as a single unit, and processed on the server as a single unit. Transactions can also include constraints (implemented via WATCH), but note that constraint checking involves will (very briefly) block the connection, since the transaction cannot be correctly committed (EXEC), aborted (DISCARD) or not applied in the first place (UNWATCH) until the responses from the constraint checks have arrived. Note that on a cluster, it may be required that all keys involved in the transaction (including constraints) are in the same hash-slot. Adds a precondition for this transaction. The condition to add to the transaction. Execute the batch operation, sending all queued commands to the server. The command flags to use. Execute the batch operation, sending all queued commands to the server. The command flags to use. Describes internal errors (mainly intended for debugging). This constructor is only for testing purposes. The source of the event. Redis connection type. The exception that occurred. Origin. Gets the connection-type of the failing connection. Gets the failing server-endpoint (this can be null). Gets the exception if available (this can be null). The underlying origin of the error. Provides the extension method to . Creates a new instance that provides an isolated key space of the specified underlying database instance. The underlying database instance that the returned instance shall use. The prefix that defines a key space isolation for the returned database instance. A new instance that invokes the specified underlying but prepends the specified to all key parameters and thus forms a logical key space isolation. The following methods are not supported in a key space isolated database and will throw an when invoked: Please notice that keys passed to a script are prefixed (as normal) but care must be taken when a script returns the name of a key as that will (currently) not be "unprefixed". A sized region of contiguous memory backed by a memory pool; disposing the lease returns the memory to the pool. The type of data being leased. A lease of length zero. The length of the lease. Create a new lease. The size required. Whether to erase the memory. Release all resources owned by the lease. The data as a . The data as a . The data as an . Represents a retry policy that performs retries at a fixed interval. The retries are performed up to a maximum allowed time. Initializes a new instance using the specified maximum retry elapsed time allowed. maximum elapsed time in milliseconds to be allowed for it to perform retries. This method is called by the ConnectionMultiplexer to determine if a reconnect operation can be retried now. The number of times reconnect retries have already been made by the ConnectionMultiplexer while it was in the connecting state. Total elapsed time in milliseconds since the last reconnect retry was made. Represents a Lua script that can be executed on Redis. Unlike normal Redis Lua scripts, LuaScript can have named parameters (prefixed by a @). Public fields and properties of the passed in object are treated as parameters. Parameters of type RedisKey are sent to Redis as KEY (https://redis.io/commands/eval) in addition to arguments, so as to play nicely with Redis Cluster. All members of this class are thread safe. Since the mapping of "script text" -> LuaScript doesn't depend on any particular details of the redis connection itself, this cache is global. The original Lua script that was used to create this. The Lua script that will actually be sent to Redis for execution. All @-prefixed parameter names have been replaced at this point. Arguments are in the order they have to passed to the script in. Finalizer - used to prompt cleanups of the script cache when a LuaScript reference goes out of scope. Invalidates the internal cache of LuaScript objects. Existing LuaScripts will continue to work, but future calls to LuaScript.Prepare return a new LuaScript instance. Returns the number of cached LuaScripts. Prepares a Lua script with named parameters to be run against any Redis instance. The script to prepare. Evaluates this LuaScript against the given database, extracting parameters from the passed in object if any. The redis database to evaluate against. The parameter object to use. The key prefix to use, if any. The command flags to use. Evaluates this LuaScript against the given database, extracting parameters from the passed in object if any. The redis database to evaluate against. The parameter object to use. The key prefix to use, if any. The command flags to use. Loads this LuaScript into the given IServer so it can be run with it's SHA1 hash, instead of using the implicit SHA1 hash that's calculated after the script is sent to the server for the first time. Note: the FireAndForget command flag cannot be set. The server to load the script on. The command flags to use. Loads this LuaScript into the given IServer so it can be run with it's SHA1 hash, instead of using the implicit SHA1 hash that's calculated after the script is sent to the server for the first time. Note: the FireAndForget command flag cannot be set The server to load the script on. The command flags to use. Represents a Lua script that can be executed on Redis. Unlike LuaScript, LoadedLuaScript sends the hash of it's ExecutableScript to Redis rather than pass the whole script on each call. This requires that the script be loaded into Redis before it is used. To create a LoadedLuaScript first create a LuaScript via LuaScript.Prepare(string), then call Load(IServer, CommandFlags) on the returned LuaScript. Unlike normal Redis Lua scripts, LoadedLuaScript can have named parameters (prefixed by a @). Public fields and properties of the passed in object are treated as parameters. Parameters of type RedisKey are sent to Redis as KEY (https://redis.io/commands/eval) in addition to arguments, so as to play nicely with Redis Cluster. All members of this class are thread safe. The original script that was used to create this LoadedLuaScript. The script that will actually be sent to Redis for execution. The SHA1 hash of ExecutableScript. This is sent to Redis instead of ExecutableScript during Evaluate and EvaluateAsync calls. Be aware that using hash directly is not resilient to Redis server restarts. Evaluates this LoadedLuaScript against the given database, extracting parameters for the passed in object if any. This method sends the SHA1 hash of the ExecutableScript instead of the script itself. If the script has not been loaded into the passed Redis instance, it will fail. The redis database to evaluate against. The parameter object to use. The key prefix to use, if any. The command flags to use. Evaluates this LoadedLuaScript against the given database, extracting parameters for the passed in object if any. This method sends the SHA1 hash of the ExecutableScript instead of the script itself. If the script has not been loaded into the passed Redis instance, it will fail. The redis database to evaluate against. The parameter object to use. The key prefix to use, if any. The command flags to use. Azure node maintenance event. For more information, please see: . Indicates the type of event (raw string form). The parsed version of for easier consumption. Indicates if the event is for a replica node. IPAddress of the node event is intended for. SSL Port. Non-SSL port. The types of notifications that Azure is sending for events happening. Unrecognized event type, likely needs a library update to recognize new events. Indicates that a maintenance event is scheduled. May be several minutes from now. This event gets fired ~20s before maintenance begins. This event gets fired when maintenance is imminent (<5s). Indicates that the node maintenance operation is over. Indicates that a replica has been promoted to primary. Indicates that a scale event (adding or removing nodes) has completed for a cluster. Base class for all server maintenance events. Raw message received from the server. The time the event was received. If we know when the event is expected to start will be populated. Indicates the expected start time of the event. Returns a string representing the maintenance event with all of its properties. Notifies a ConnectionMultiplexer of this event, for anyone observing its handler. Things with the potential to cause harm, or to reveal configuration information Gets whether this is primary-only. Note that the constructor runs the switch statement above, so this will already be true for primary-only commands, even if the user specified etc. This does a few important things: 1: it suppresses error events for commands that the user isn't interested in (i.e. "why does my standalone server keep saying ERR unknown command 'cluster' ?") 2: it allows the initial PING and GET (during connect) to get queued rather than be rejected as no-server-available (note that this doesn't apply to handshake messages, as they bypass the queue completely) 3: it disables non-pref logging, as it is usually server-targeted Gets a string representation of this message: "[{DB}]:{CommandAndKey} ({resultProcessor})" Gets a string representation of this message without the key: "[{DB}]:{Command} ({resultProcessor})" Gets if this command should be sent over the subscription bridge. Sends this command to the subscription connection rather than the interactive. Checks if this message has violated the provided timeout. Whether it's a sync operation in a .Wait() or in the backlog queue or written/pending asynchronously, we need to timeout everything. ...or we get indefinite Task hangs for completions. Sets the processor and box for this message to execute. Note order here is reversed to prevent overload resolution errors. Sets the box and processor for this message to execute. Note order here is reversed to prevent overload resolution errors. We have 1 queue in play on this bridge. We're bypassing the queue for handshake events that go straight to the socket. Everything else that's not an internal call goes into the queue if there is a queue. In a later release we want to remove per-server events from this queue completely and shunt queued messages to another capable primary connection if one is available to process them faster (order is already hosed). For now, simplicity in: queue it all, replay or timeout it all. If we have a connection, report the protocol being used Number of messages sent since the last heartbeat was processed. The time this connection was connected at, if it's connected currently. Whether the pipe writer is currently active. Status of the currently processing backlog, if any. The number of messages that are in the backlog queue (waiting to be sent when the connection is healthy again). The number of messages that are in the backlog queue (waiting to be sent when the connection is healthy again). The number of messages ever added to the backlog queue in the life of this connection. Status for the underlying . The default bridge stats, notable *not* the same as default since initializers don't run. Crawls from the head of the backlog queue, consuming anything that should have timed out and pruning it accordingly (these messages will get timeout exceptions). Process the backlog(s) in play if any. This means flushing commands to an available/active connection (if any) or spinning until timeout if not. Reset event for monitoring backlog additions mid-run. This allows us to keep the thread around for a full flush and prevent "feathering the throttle" trying to flush it. In short, we don't start and stop so many threads with a bit of linger. This writes a message to the output stream. The physical connection to write to. The message to be written. Whether this message should bypass the backlog, going straight to the pipe or failing. For testing only Nullable because during simulation of failure, we'll null out. ...but in those cases, we'll accept any null ref in a race - it's fine. Did we ask for the shutdown? If so this leads to informational messages for tracking but not errors. Returns a string that represents the current object. A string that represents the current object. Runs on every heartbeat for a bridge, timing out any commands that are overdue and returning an integer of how many we timed out. How many commands were overdue and threw timeout exceptions. Number of messages sent outbound, but we don't yet have a response for. Bytes available on the socket, not yet read into the pipe. Bytes read from the socket, pending in the reader pipe. Bytes in the writer pipe, waiting to be written to the socket. Byte size of the last result we processed. Byte size on the buffer that isn't processed yet. The inbound pipe reader status. The outbound pipe writer status. The default connection stats, notable *not* the same as default since initializers don't run. The zeroed connection stats, which we want to display as zero for default exception cases. A profiled command against a redis instance. TimeSpans returned by this interface use a high precision timer if possible. DateTimes returned by this interface are no more precise than DateTime.UtcNow. The endpoint this command was sent to. The Db this command was sent to. The name of this command. The CommandFlags the command was submitted with. When this command was *created*, will be approximately when the paired method of StackExchange.Redis was called but before that method returned. Note that the resolution of the returned DateTime is limited by DateTime.UtcNow. How long this command waited to be added to the queue of pending redis commands. A large TimeSpan indicates serious contention for the pending queue. How long this command spent in the pending queue before being sent to redis. A large TimeSpan can indicate a large number of pending events, large pending events, or network issues. How long before Redis responded to this command and it's response could be handled after it was sent. A large TimeSpan can indicate a large response body, an overtaxed redis instance, or network issues. How long between Redis responding to this command and awaiting consumers being notified. How long it took this redis command to be processed, from creation to deserializing the final response. Note that this TimeSpan *does not* include time spent awaiting a Task in consumer code. If a command has to be resent due to an ASK or MOVED response from redis (in a cluster configuration), the second sending of the command will have this property set to the original IProfiledCommand. This can only be set if redis is configured as a cluster. If RetransmissionOf is not null, this property will be set to either Ask or Moved to indicate what sort of response triggered the retransmission. This can be useful for determining the root cause of extra commands. A collection of IProfiledCommands. This is a very light weight data structure, only supporting enumeration. While it implements IEnumerable, it there are fewer allocations if one uses it's explicit GetEnumerator() method. Using `foreach` does this automatically. This type is not threadsafe. Implements IEnumerator for ProfiledCommandEnumerable. This implementation is comparable to List.Enumerator and Dictionary.Enumerator, and is provided to reduce allocations in the common (ie. foreach) case. This type is not threadsafe. The current element. Advances the enumeration, returning true if there is a new element to consume and false if enumeration is complete. Resets the enumeration. Disposes the enumeration. subsequent attempts to enumerate results in undefined behavior. Returns the number of commands captured in this snapshot Returns the number of commands captured in this snapshot that match a condition The predicate to match. Returns the captured commands as an array Returns the captured commands as a list Returns an implementor of IEnumerator that, provided it isn't accessed though an interface, avoids allocations. `foreach` will automatically use this method. Lightweight profiling session that can be optionally registered (via ConnectionMultiplexer.RegisterProfiler) to track messages. Caller-defined state object. Create a new profiling session, optionally including a caller-defined state object. The state object to use for this session. Reset the session and yield the commands that were captured for enumeration; if additional commands are added, they can be retrieved via additional calls to FinishProfiling. Represents a pub/sub channel name. Indicates whether the channel-name is either null or a zero-length value. Indicates whether this channel represents a wildcard pattern (see PSUBSCRIBE) Indicates whether channels should use when no is specified; this is enabled by default, but can be disabled to avoid unexpected wildcard scenarios. Creates a new that does not act as a wildcard subscription Creates a new that does not act as a wildcard subscription Creates a new that acts as a wildcard subscription Creates a new that acts as a wildcard subscription Create a new redis channel from a buffer, explicitly controlling the pattern mode. The name of the channel to create. The mode for name matching. Create a new redis channel from a string, explicitly controlling the pattern mode. The string name of the channel to create. The mode for name matching. Indicate whether two channel names are not equal. The first to compare. The second to compare. Indicate whether two channel names are not equal. The first to compare. The second to compare. Indicate whether two channel names are not equal. The first to compare. The second to compare. Indicate whether two channel names are not equal. The first to compare. The second to compare. Indicate whether two channel names are not equal. The first to compare. The second to compare. Indicate whether two channel names are equal. The first to compare. The second to compare. Indicate whether two channel names are equal. The first to compare. The second to compare. Indicate whether two channel names are equal. The first to compare. The second to compare. Indicate whether two channel names are equal. The first to compare. The second to compare. Indicate whether two channel names are equal. The first to compare. The second to compare. See . The to compare to. Indicate whether two channel names are equal. The to compare to. Obtains a string representation of the channel name. The matching pattern for this channel. Will be treated as a pattern if it includes *. Never a pattern. Always a pattern. Create a channel name from a . The string to get a channel from. Create a channel name from a . The byte array to get a channel from. Obtain the channel name as a . The channel to get a byte[] from. Obtain the channel name as a . The channel to get a string from. Gets message for . Gets a message for Notification of errors from the redis server. This constructor is only for testing purposes. The source of the event. Redis endpoint. Error message. The origin of the message. The message from the server. Provides basic information about the features available on a particular version of Redis. Create a new RedisFeatures instance for the given version. The version of redis to base the feature set on. Are BITOP and BITCOUNT available? Is CLIENT SETNAME available? Is CLIENT ID available? Does EXEC support EXECABORT if there are errors? Can EXPIRE be used to set expiration on a key that is already volatile (i.e. has an expiration)? Is GETDEL available? Is HSTRLEN available? Does HDEL support variadic usage? Are INCRBYFLOAT and HINCRBYFLOAT available? Does INFO support sections? Is LINSERT available? Is MEMORY available? Are PEXPIRE and PTTL available? Is MODULE available? Does SRANDMEMBER support the "count" option? Is PERSIST available? Are LPUSHX and RPUSHX available? Does this support SORT_RO? Is SCAN (cursor-based scanning) available? Are EVAL, EVALSHA, and other script commands available? Does SET support the GET option? Does SET support the EX, PX, NX, and XX options? Does SET have the KEEPTTL option? Does SET allow the NX and GET options to be used together? Does SADD support variadic usage? Are ZPOPMIN and ZPOPMAX available? Is ZRANGESTORE available? Are Redis Streams available? Is STRLEN available? Is SETRANGE available? Is SWAPDB available? Is TIME available? Is UNLINK available? Are Lua changes to the calling database transparent to the calling client? Is PFCOUNT available on replicas? Are geospatial commands available? Can PING be used on a subscription connection? Does SPOP support popping multiple items? Is TOUCH available? Does the server prefer 'replica' terminology - 'REPLICAOF', etc? Do list-push commands support multiple arguments? Is the RESP3 protocol available? The Redis version of the server Create a string representation of the available features. Returns the hash code for this instance. A 32-bit signed integer that is the hash code for this instance. Indicates whether this instance and a specified object are equal. if and this instance are the same type and represent the same value, otherwise. The object to compare with the current instance. Indicates whether this instance and a specified object are equal. if and this instance are the same type and represent the same value, otherwise. The object to compare with the current instance. Checks if 2 are .Equal(). Checks if 2 are not .Equal(). Represents a key that can be stored in redis Creates a from a string. Indicate whether two keys are not equal. The first to compare. The second to compare. Indicate whether two keys are not equal. The first to compare. The second to compare. Indicate whether two keys are not equal. The first to compare. The second to compare. Indicate whether two keys are not equal. The first to compare. The second to compare. Indicate whether two keys are not equal. The first to compare. The second to compare. Indicate whether two keys are equal. The first to compare. The second to compare. Indicate whether two keys are equal. The first to compare. The second to compare. Indicate whether two keys are equal. The first to compare. The second to compare. Indicate whether two keys are equal. The first to compare. The second to compare. Indicate whether two keys are equal. The first to compare. The second to compare. See . The to compare to. Indicate whether two keys are equal. The to compare to. Obtains a string representation of the key. Create a from a . The string to get a key from. Create a from a . The byte array to get a key from. Obtain the as a . The key to get a byte array for. Obtain the key as a . The key to get a string for. Concatenate two keys. The first to add. The second to add. Prepends p to this RedisKey, returning a new RedisKey. Avoids some allocations if possible, repeated Prepend/Appends make it less possible. The prefix to prepend. Appends p to this RedisKey, returning a new RedisKey. Avoids some allocations if possible, repeated Prepend/Appends make it less possible. The suffix to append. Indicates the protocol for communicating with the server. The protocol used by all redis server versions since 1.2, as defined by https://github.com/redis/redis-specifications/blob/master/protocol/RESP2.md Opt-in variant introduced in server version 6, as defined by https://github.com/redis/redis-specifications/blob/master/protocol/RESP3.md Represents a general-purpose result from redis, that may be cast into various anticipated types. Do not use. Create a new RedisResult representing a single value. The to create a result from. The type of result being represented new . Create a new RedisResult representing an array of values. The s to create a result from. new . Create a new RedisResult representing an array of values. The s to create a result from. The explicit data type. new . Create a new RedisResult representing an array of values. The s to create a result from. new . Create a new RedisResult representing an array of values. The s to create a result from. The explicit data type. new . An empty array result. A null array result. A null single result, to use as a default for invalid returns. Gets the number of elements in this item if it is a valid array, or -1 otherwise. Gets the string content as per , but also obtains the declared type from verbatim strings (for example LATENCY DOCTOR) The type of the returned string. The content Internally, this is very similar to RawResult, except it is designed to be usable, outside of the IO-processing pipeline: the buffers are standalone, etc. Indicate the type of result that was received from redis, in RESP2 terms. Indicate the type of result that was received from redis, in RESP3 terms. Indicate the type of result that was received from redis, in RESP2 terms. Indicates whether this result was a null result. Interprets the result as a . The result to convert to a . Interprets the result as a . The result to convert to a . Interprets the result as a . The result to convert to a . Interprets the result as an . The result to convert to a . Interprets the result as an . The result to convert to a . Interprets the result as an . The result to convert to a . Interprets the result as a The result to convert to a . Interprets the result as a . The result to convert to a . Interprets the result as a . The result to convert to a . Interprets the result as a . The result to convert to a . Interprets the result as a . The result to convert to a . Interprets the result as a . The result to convert to a . Interprets the result as a . The result to convert to a . Interprets the result as a . The result to convert to a . Interprets the result as a . The result to convert to a . Interprets the result as a . The result to convert to a . Interprets the result as a . The result to convert to a . Interprets the result as a . The result to convert to a . Interprets the result as a . The result to convert to a . Interprets the result as a . The result to convert to a . Interprets the result as a . The result to convert to a . Interprets the result as a . The result to convert to a . Interprets the result as a . The result to convert to a . Interprets the result as a . The result to convert to a . Interprets a multi-bulk result with successive key/name values as a dictionary keyed by name. The key comparator to use, or by default. Get a sub-item by index. Create a from a key. The to create a from. Create a from a channel. The to create a from. For testing only A wrapper for subscription actions. By having most functionality here and state on , we can use the baseline execution methods to take the normal message paths. This is *could* we be connected, as in "what's the theoretical endpoint for this channel?", rather than if we're actually connected and actually listening on that channel. Unregisters a handler or queue and returns if we should remove it from the server. if we should remove the subscription from the server, otherwise. Represents values that can be stored in redis. Creates a from a string. Obtain this value as an object - to be used alongside Unbox Parse this object as a value - to be used alongside Box. The value to unbox. Represents the string "". A null value. Indicates whether the **underlying** value is a primitive integer (signed or unsigned); this is **not** the same as whether the value can be *treated* as an integer - see and , which is usually the more appropriate test. Indicates whether the value should be considered a null value. Indicates whether the value is either null or a zero-length value. Indicates whether the value is greater than zero-length or has an integer value. Indicates whether two RedisValue values are equivalent. The first to compare. The second to compare. Indicates whether two RedisValue values are equivalent. The first to compare. The second to compare. See . The other to compare. Indicates whether two RedisValue values are equivalent. The to compare to. Returns a string representation of the value. Get the size of this value in bytes Compare against a RedisValue for relative order. The other to compare. Creates a new from an . The to convert to a . Creates a new from an . The to convert to a . Creates a new from an . The to convert to a . Creates a new from an . The to convert to a . Creates a new from an . The to convert to a . Creates a new from an . The to convert to a . Creates a new from an . The to convert to a . Creates a new from an . The to convert to a . Creates a new from an . The to convert to a . Creates a new from an . The to convert to a . Creates a new from a . The to convert to a . Creates a new from a . The to convert to a . Creates a new from an . The to convert to a . Creates a new from an . The to convert to a . Creates a new from an . The to convert to a . Creates a new from an . The to convert to a . Converts a to a . The to convert. Converts a to a . The to convert. Converts a to a . The to convert. Converts a to a . The to convert. Converts a to a . The to convert. Converts a to a . The to convert. Converts a to a . The to convert. Converts a to a . The to convert. Converts the to a . The to convert. Converts the to a . The to convert. Converts the to a . The to convert. Converts the to a . The to convert. Converts the to a . The to convert. Converts the to a . The to convert. Converts the to a . The to convert. Converts the to a . The to convert. Converts a to a . The to convert. Converts a to a . The to convert. Converts a to a . The to convert. Attempt to reduce to canonical terms ahead of time; parses integers, floats, etc Note: we don't use this aggressively ahead of time, a: because of extra CPU, but more importantly b: because it can change values - for example, if they start with "123.000", it should **stay** as "123.000", not become 123L; this could be a hash key or similar - we don't want to break it; RedisConnection uses the storage type, not the "does it look like a long?" - for this reason Convert to a signed if possible. The value, if conversion was possible. if successfully parsed, otherwise. Convert to an if possible. The value, if conversion was possible. if successfully parsed, otherwise. Convert to a if possible. The value, if conversion was possible. if successfully parsed, otherwise. Create a from a . It will *attempt* to use the internal buffer directly, but if this isn't possible it will fallback to . The to create a value from. Indicates whether the current value has the supplied value as a prefix. The to check. Anything hashed with SHA1 has exactly 40 characters. We can use that as a shortcut in the code bellow. Parser for the https://redis.io/commands/lcs/ format with the and arguments. Example response: 1) "matches" 2) 1) 1) 1) (integer) 4 2) (integer) 7 2) 1) (integer) 5 2) (integer) 8 3) (integer) 4 3) "len" 4) (integer) 6 Handles . Handles . This processor is for *without* the option. This processor is for *with* the option. Handles stream responses. For formats, see . Result of the ROLE command. Values depend on the role: master, replica, or sentinel. One of "master", "slave" (aka replica), or "sentinel". Result of the ROLE command for a primary node. The replication offset. To be consumed by replica nodes. Connected replica nodes. A connected replica node. The IP address of this replica node. The port number of this replica node. The last replication offset acked by this replica node. Result of the ROLE command for a replica node. The IP address of the primary node for this replica. The port number of the primary node for this replica. This replica's replication state. The last replication offset received by this replica. Result of the ROLE command for a sentinel node. Primary names monitored by this sentinel node. An unexpected result of the ROLE command. Turns a script with @namedParameters into a LuaScript that can be executed against a given IDatabase(Async) object. The script to prepare. Determines whether or not the given type can be used to provide parameters for the given . The type of the parameter. The script to match against. The first missing member, if any. The first type mismatched member, if any. Creates a Func that extracts parameters from the given type for use by a LuaScript. Members that are RedisKey's get extracted to be passed in as keys to redis; all members that appear in the script get extracted as RedisValue arguments to be sent up as args. We send all values as arguments so we don't have to prepare the same script for different parameter types. The created Func takes a RedisKey, which will be prefixed to all keys (and arguments of type RedisKey) for keyspace isolation. The type to extract for. The script to extract for. Illustrates the queues associates with this server. Creates a instance for an . The to create counters for. The endpoint to which this data relates (this can be null if the data represents all servers). Counters associated with the interactive (non pub-sub) connection. Counters associated with other ambient activity. Counters associated with the subscription (pub-sub) connection. Indicates the total number of outstanding items against this server. See Object.ToString(); Whether this endpoint supports databases at all. Note that some servers are cluster but present as standalone (e.g. Redis Enterprise), so we respect being disabled here as a performance workaround. This is memoized because it's accessed on hot paths inside the write lock. Awaitable state seeing if this endpoint is connected. If we have a connection (interactive), report the protocol being used Used to round-robin between multiple replicas Result of the latest tie breaker (from the last reconfigure). Forces frequent replication check starting from 1 second up to max ConfigCheckSeconds with an exponential increment. Write the message directly to the pipe or fail...will not queue. For testing only Computes the hash-slot that would be used by the given key. The to determine a slot ID for. Computes the hash-slot that would be used by the given channel. The to determine a slot ID for. Gets the hashslot for a given byte sequence. HASH_SLOT = CRC16(key) mod 16384 A SocketManager monitors multiple sockets for availability of data; this is done using the Socket.Select API and a dedicated reader-thread, which allows for fast responses even when the system is under ambient load. Gets the name of this SocketManager instance. Creates a new instance. The name for this . Creates a new instance. The name for this . Whether this should use high priority sockets. Creates a new (optionally named) instance. The name for this . the number of dedicated workers for this . Whether this should use high priority sockets. Additional options for configuring the socket manager. No additional options. Whether the should use high priority sockets. Use the regular thread-pool for all scheduling Creates a new (optionally named) instance. The name for this . the number of dedicated workers for this . Default / shared socket manager using a dedicated thread-pool. Shared socket manager using the main thread-pool. Returns a string that represents the current object. A string that represents the current object. Releases all resources associated with this instance. Releases *appropriate* resources associated with this instance. Constants representing values used in Redis Stream commands. The "~" value used with the MAXLEN option. The "*" value used with the XADD command. The "$" value used in the XGROUP command. Indicates reading only new messages from the stream. The "0" value used in the XGROUP command. Indicates reading all messages from the stream. The "-" value used in the XRANGE, XREAD, and XREADGROUP commands. Indicates the minimum message ID from the stream. The "+" value used in the XRANGE, XREAD, and XREADGROUP commands. Indicates the maximum message ID from the stream. The ">" value used in the XREADGROUP command. Use this to read messages that have not been delivered to a consumer group. Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. Inspired from Create a new TaskCompletion source. The type for the created . The state for the created . The options to apply to the task. Optimization over . From . Specifies that null is allowed as an input even if the corresponding type disallows it. Specifies that null is disallowed as an input even if the corresponding type allows it. Specifies that an output may be null even if the corresponding type disallows it. Specifies that an output will not be null even if the corresponding type allows it. Specifies that an input argument was not null when the call returns. Specifies that when a method returns , the parameter may be null even if the corresponding type disallows it. Initializes the attribute with the specified return value condition. The return value condition. If the method returns this value, the associated parameter may be null. Gets the return value condition. Specifies that when a method returns , the parameter will not be null even if the corresponding type allows it. Initializes the attribute with the specified return value condition. The return value condition. If the method returns this value, the associated parameter will not be null. Gets the return value condition. Specifies that the output will be non-null if the named parameter is non-null. Initializes the attribute with the associated parameter name. The associated parameter name. The output will be non-null if the argument to the parameter specified is non-null. Gets the associated parameter name. Applied to a method that will never return under any circumstance. Specifies that the method will not return if the associated Boolean parameter is passed the specified value. Initializes the attribute with the specified parameter value. The condition parameter value. Code after the method will be considered unreachable by diagnostics if the argument to the associated parameter matches this value. Gets the condition parameter value. Specifies that the method or property will ensure that the listed field and property members have not-null values. Initializes the attribute with a field or property member. The field or property member that is promised to be not-null. Initializes the attribute with the list of field and property members. The list of field and property members that are promised to be not-null. Gets field or property member names. Specifies that the method or property will ensure that the listed field and property members have not-null values when returning with the specified return value condition. Initializes the attribute with the specified return value condition and a field or property member. The return value condition. If the method returns this value, the associated parameter will not be null. The field or property member that is promised to be not-null. Initializes the attribute with the specified return value condition and list of field and property members. The return value condition. If the method returns this value, the associated parameter will not be null. The list of field and property members that are promised to be not-null. Gets the return value condition. Gets field or property member names.