Table of Contents

Interface IServer

Namespace
StackExchange.Redis
Assembly
StackExchange.Redis.StrongName.dll

Provides configuration controls of a redis server

public interface IServer : IRedis, IRedisAsync
Inherited Members

Properties

AllowSlaveWrites

Explicitly opt in for slave writes on writable slaves

bool AllowSlaveWrites { get; set; }

Property Value

bool

ClusterConfiguration

Gets the cluster configuration associated with this server, if known

ClusterConfiguration ClusterConfiguration { get; }

Property Value

ClusterConfiguration

EndPoint

Gets the address of the connected server

EndPoint EndPoint { get; }

Property Value

EndPoint

Features

Gets the features available to the connected server

RedisFeatures Features { get; }

Property Value

RedisFeatures

IsConnected

Gets whether the connection to the server is active and usable

bool IsConnected { get; }

Property Value

bool

IsSlave

Gets whether the connected server is a replica / slave

bool IsSlave { get; }

Property Value

bool

ServerType

Gets the operating mode of the connected server

ServerType ServerType { get; }

Property Value

ServerType

Version

Gets the version of the connected server

Version Version { get; }

Property Value

Version

Methods

ClientKill(EndPoint, CommandFlags)

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-treaded 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).

void ClientKill(EndPoint endpoint, CommandFlags flags = CommandFlags.None)

Parameters

endpoint EndPoint
flags CommandFlags

Remarks

ClientKill(long?, ClientType?, EndPoint, bool, CommandFlags)

The CLIENT KILL command closes multiple connections that match the specified filters

long ClientKill(long? id = null, ClientType? clientType = null, EndPoint endpoint = null, bool skipMe = true, CommandFlags flags = CommandFlags.None)

Parameters

id long?
clientType ClientType?
endpoint EndPoint
skipMe bool
flags CommandFlags

Returns

long

the number of clients killed.

Remarks

ClientKillAsync(EndPoint, CommandFlags)

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-treaded 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).

Task ClientKillAsync(EndPoint endpoint, CommandFlags flags = CommandFlags.None)

Parameters

endpoint EndPoint
flags CommandFlags

Returns

Task

Remarks

ClientKillAsync(long?, ClientType?, EndPoint, bool, CommandFlags)

The CLIENT KILL command closes multiple connections that match the specified filters

Task<long> ClientKillAsync(long? id = null, ClientType? clientType = null, EndPoint endpoint = null, bool skipMe = true, CommandFlags flags = CommandFlags.None)

Parameters

id long?
clientType ClientType?
endpoint EndPoint
skipMe bool
flags CommandFlags

Returns

Task<long>

the number of clients killed.

Remarks

ClientList(CommandFlags)

The CLIENT LIST command returns information and statistics about the client connections server in a mostly human readable format.

ClientInfo[] ClientList(CommandFlags flags = CommandFlags.None)

Parameters

flags CommandFlags

Returns

ClientInfo[]

Remarks

ClientListAsync(CommandFlags)

The CLIENT LIST command returns information and statistics about the client connections server in a mostly human readable format.

Task<ClientInfo[]> ClientListAsync(CommandFlags flags = CommandFlags.None)

Parameters

flags CommandFlags

Returns

Task<ClientInfo[]>

Remarks

ClusterNodes(CommandFlags)

Obtains the current CLUSTER NODES output from a cluster server

ClusterConfiguration ClusterNodes(CommandFlags flags = CommandFlags.None)

Parameters

flags CommandFlags

Returns

ClusterConfiguration

ClusterNodesAsync(CommandFlags)

Obtains the current CLUSTER NODES output from a cluster server

Task<ClusterConfiguration> ClusterNodesAsync(CommandFlags flags = CommandFlags.None)

Parameters

flags CommandFlags

Returns

Task<ClusterConfiguration>

ClusterNodesRaw(CommandFlags)

Obtains the current raw CLUSTER NODES output from a cluster server

string ClusterNodesRaw(CommandFlags flags = CommandFlags.None)

Parameters

flags CommandFlags

Returns

string

ClusterNodesRawAsync(CommandFlags)

Obtains the current raw CLUSTER NODES output from a cluster server

Task<string> ClusterNodesRawAsync(CommandFlags flags = CommandFlags.None)

Parameters

flags CommandFlags

Returns

Task<string>

ConfigGet(RedisValue, CommandFlags)

Get all configuration parameters matching the specified pattern.

KeyValuePair<string, string>[] ConfigGet(RedisValue pattern = default, CommandFlags flags = CommandFlags.None)

Parameters

pattern RedisValue
flags CommandFlags

Returns

KeyValuePair<string, string>[]

All matching configuration parameters.

Remarks

ConfigGetAsync(RedisValue, CommandFlags)

Get all configuration parameters matching the specified pattern.

Task<KeyValuePair<string, string>[]> ConfigGetAsync(RedisValue pattern = default, CommandFlags flags = CommandFlags.None)

Parameters

pattern RedisValue
flags CommandFlags

Returns

Task<KeyValuePair<string, string>[]>

All matching configuration parameters.

Remarks

ConfigResetStatistics(CommandFlags)

Resets the statistics reported by Redis using the INFO command.

void ConfigResetStatistics(CommandFlags flags = CommandFlags.None)

Parameters

flags CommandFlags

Remarks

ConfigResetStatisticsAsync(CommandFlags)

Resets the statistics reported by Redis using the INFO command.

Task ConfigResetStatisticsAsync(CommandFlags flags = CommandFlags.None)

Parameters

flags CommandFlags

Returns

Task

Remarks

ConfigRewrite(CommandFlags)

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.

void ConfigRewrite(CommandFlags flags = CommandFlags.None)

Parameters

flags CommandFlags

Remarks

ConfigRewriteAsync(CommandFlags)

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.

Task ConfigRewriteAsync(CommandFlags flags = CommandFlags.None)

Parameters

flags CommandFlags

Returns

Task

Remarks

ConfigSet(RedisValue, RedisValue, CommandFlags)

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.

void ConfigSet(RedisValue setting, RedisValue value, CommandFlags flags = CommandFlags.None)

Parameters

setting RedisValue
value RedisValue
flags CommandFlags

Remarks

ConfigSetAsync(RedisValue, RedisValue, CommandFlags)

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.

Task ConfigSetAsync(RedisValue setting, RedisValue value, CommandFlags flags = CommandFlags.None)

Parameters

setting RedisValue
value RedisValue
flags CommandFlags

Returns

Task

Remarks

DatabaseSize(int, CommandFlags)

Return the number of keys in the database.

long DatabaseSize(int database = 0, CommandFlags flags = CommandFlags.None)

Parameters

database int
flags CommandFlags

Returns

long

Remarks

DatabaseSizeAsync(int, CommandFlags)

Return the number of keys in the database.

Task<long> DatabaseSizeAsync(int database = 0, CommandFlags flags = CommandFlags.None)

Parameters

database int
flags CommandFlags

Returns

Task<long>

Remarks

Echo(RedisValue, CommandFlags)

Return the same message passed in

RedisValue Echo(RedisValue message, CommandFlags flags = CommandFlags.None)

Parameters

message RedisValue
flags CommandFlags

Returns

RedisValue

Remarks

EchoAsync(RedisValue, CommandFlags)

Return the same message passed in

Task<RedisValue> EchoAsync(RedisValue message, CommandFlags flags = CommandFlags.None)

Parameters

message RedisValue
flags CommandFlags

Returns

Task<RedisValue>

Remarks

FlushAllDatabases(CommandFlags)

Delete all the keys of all databases on the server.

void FlushAllDatabases(CommandFlags flags = CommandFlags.None)

Parameters

flags CommandFlags

Remarks

FlushAllDatabasesAsync(CommandFlags)

Delete all the keys of all databases on the server.

Task FlushAllDatabasesAsync(CommandFlags flags = CommandFlags.None)

Parameters

flags CommandFlags

Returns

Task

Remarks

FlushDatabase(int, CommandFlags)

Delete all the keys of the database.

void FlushDatabase(int database = 0, CommandFlags flags = CommandFlags.None)

Parameters

database int
flags CommandFlags

Remarks

FlushDatabaseAsync(int, CommandFlags)

Delete all the keys of the database.

Task FlushDatabaseAsync(int database = 0, CommandFlags flags = CommandFlags.None)

Parameters

database int
flags CommandFlags

Returns

Task

Remarks

GetCounters()

Get summary statistics associates with this server

ServerCounters GetCounters()

Returns

ServerCounters

Info(RedisValue, CommandFlags)

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.

IGrouping<string, KeyValuePair<string, string>>[] Info(RedisValue section = default, CommandFlags flags = CommandFlags.None)

Parameters

section RedisValue
flags CommandFlags

Returns

IGrouping<string, KeyValuePair<string, string>>[]

Remarks

InfoAsync(RedisValue, CommandFlags)

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.

Task<IGrouping<string, KeyValuePair<string, string>>[]> InfoAsync(RedisValue section = default, CommandFlags flags = CommandFlags.None)

Parameters

section RedisValue
flags CommandFlags

Returns

Task<IGrouping<string, KeyValuePair<string, string>>[]>

Remarks

InfoRaw(RedisValue, CommandFlags)

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.

string InfoRaw(RedisValue section = default, CommandFlags flags = CommandFlags.None)

Parameters

section RedisValue
flags CommandFlags

Returns

string

Remarks

InfoRawAsync(RedisValue, CommandFlags)

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.

Task<string> InfoRawAsync(RedisValue section = default, CommandFlags flags = CommandFlags.None)

Parameters

section RedisValue
flags CommandFlags

Returns

Task<string>

Remarks

Keys(int, RedisValue, int, CommandFlags)

Returns all keys matching pattern; the KEYS or SCAN commands will be used based on the server capabilities.

IEnumerable<RedisKey> Keys(int database, RedisValue pattern, int pageSize, CommandFlags flags)

Parameters

database int
pattern RedisValue
pageSize int
flags CommandFlags

Returns

IEnumerable<RedisKey>

Remarks

Warning: consider KEYS as a command that should only be used in production environments with extreme care.

Keys(int, RedisValue, int, long, int, CommandFlags)

Returns all keys matching pattern; 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 IScanningCursor.

IEnumerable<RedisKey> Keys(int database = 0, RedisValue pattern = default, int pageSize = 10, long cursor = 0, int pageOffset = 0, CommandFlags flags = CommandFlags.None)

Parameters

database int
pattern RedisValue
pageSize int
cursor long
pageOffset int
flags CommandFlags

Returns

IEnumerable<RedisKey>

Remarks

Warning: consider KEYS as a command that should only be used in production environments with extreme care.

LastSave(CommandFlags)

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.

DateTime LastSave(CommandFlags flags = CommandFlags.None)

Parameters

flags CommandFlags

Returns

DateTime

Remarks

LastSaveAsync(CommandFlags)

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.

Task<DateTime> LastSaveAsync(CommandFlags flags = CommandFlags.None)

Parameters

flags CommandFlags

Returns

Task<DateTime>

Remarks

MakeMaster(ReplicationChangeOptions, TextWriter)

Promote the selected node to be master

void MakeMaster(ReplicationChangeOptions options, TextWriter log = null)

Parameters

options ReplicationChangeOptions
log TextWriter

Save(SaveType, CommandFlags)

Explicitly request the database to persist the current state to disk

void Save(SaveType type, CommandFlags flags = CommandFlags.None)

Parameters

type SaveType
flags CommandFlags

Remarks

SaveAsync(SaveType, CommandFlags)

Explicitly request the database to persist the current state to disk

Task SaveAsync(SaveType type, CommandFlags flags = CommandFlags.None)

Parameters

type SaveType
flags CommandFlags

Returns

Task

Remarks

ScriptExists(byte[], CommandFlags)

Inidicates whether the specified script hash is defined on the server

bool ScriptExists(byte[] sha1, CommandFlags flags = CommandFlags.None)

Parameters

sha1 byte[]
flags CommandFlags

Returns

bool

ScriptExists(string, CommandFlags)

Inidicates whether the specified script is defined on the server

bool ScriptExists(string script, CommandFlags flags = CommandFlags.None)

Parameters

script string
flags CommandFlags

Returns

bool

ScriptExistsAsync(byte[], CommandFlags)

Inidicates whether the specified script hash is defined on the server

Task<bool> ScriptExistsAsync(byte[] sha1, CommandFlags flags = CommandFlags.None)

Parameters

sha1 byte[]
flags CommandFlags

Returns

Task<bool>

ScriptExistsAsync(string, CommandFlags)

Inidicates whether the specified script is defined on the server

Task<bool> ScriptExistsAsync(string script, CommandFlags flags = CommandFlags.None)

Parameters

script string
flags CommandFlags

Returns

Task<bool>

ScriptFlush(CommandFlags)

Removes all cached scripts on this server

void ScriptFlush(CommandFlags flags = CommandFlags.None)

Parameters

flags CommandFlags

ScriptFlushAsync(CommandFlags)

Removes all cached scripts on this server

Task ScriptFlushAsync(CommandFlags flags = CommandFlags.None)

Parameters

flags CommandFlags

Returns

Task

ScriptLoad(LuaScript, CommandFlags)

Explicitly defines a script on the server

LoadedLuaScript ScriptLoad(LuaScript script, CommandFlags flags = CommandFlags.None)

Parameters

script LuaScript
flags CommandFlags

Returns

LoadedLuaScript

ScriptLoad(string, CommandFlags)

Explicitly defines a script on the server

byte[] ScriptLoad(string script, CommandFlags flags = CommandFlags.None)

Parameters

script string
flags CommandFlags

Returns

byte[]

ScriptLoadAsync(LuaScript, CommandFlags)

Explicitly defines a script on the server

Task<LoadedLuaScript> ScriptLoadAsync(LuaScript script, CommandFlags flags = CommandFlags.None)

Parameters

script LuaScript
flags CommandFlags

Returns

Task<LoadedLuaScript>

ScriptLoadAsync(string, CommandFlags)

Explicitly defines a script on the server

Task<byte[]> ScriptLoadAsync(string script, CommandFlags flags = CommandFlags.None)

Parameters

script string
flags CommandFlags

Returns

Task<byte[]>

SentinelFailover(string, CommandFlags)

Force a failover as if the master 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).

void SentinelFailover(string serviceName, CommandFlags flags = CommandFlags.None)

Parameters

serviceName string

the sentinel service name

flags CommandFlags

Remarks

SentinelFailoverAsync(string, CommandFlags)

Force a failover as if the master 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).

Task SentinelFailoverAsync(string serviceName, CommandFlags flags = CommandFlags.None)

Parameters

serviceName string

the sentinel service name

flags CommandFlags

Returns

Task

Remarks

SentinelGetMasterAddressByName(string, CommandFlags)

Returns the ip and port number of the master with that name. If a failover is in progress or terminated successfully for this master it returns the address and port of the promoted slave.

EndPoint SentinelGetMasterAddressByName(string serviceName, CommandFlags flags = CommandFlags.None)

Parameters

serviceName string

the sentinel service name

flags CommandFlags

Returns

EndPoint

the master ip and port

Remarks

SentinelGetMasterAddressByNameAsync(string, CommandFlags)

Returns the ip and port number of the master with that name. If a failover is in progress or terminated successfully for this master it returns the address and port of the promoted slave.

Task<EndPoint> SentinelGetMasterAddressByNameAsync(string serviceName, CommandFlags flags = CommandFlags.None)

Parameters

serviceName string

the sentinel service name

flags CommandFlags

Returns

Task<EndPoint>

the master ip and port

Remarks

SentinelMaster(string, CommandFlags)

Show the state and info of the specified master.

KeyValuePair<string, string>[] SentinelMaster(string serviceName, CommandFlags flags = CommandFlags.None)

Parameters

serviceName string

the sentinel service name

flags CommandFlags

Returns

KeyValuePair<string, string>[]

the master state as KeyValuePairs

Remarks

SentinelMasterAsync(string, CommandFlags)

Force a failover as if the master 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).

Task<KeyValuePair<string, string>[]> SentinelMasterAsync(string serviceName, CommandFlags flags = CommandFlags.None)

Parameters

serviceName string

the sentinel service name

flags CommandFlags

Returns

Task<KeyValuePair<string, string>[]>

the master state as KeyValuePairs

Remarks

SentinelMasters(CommandFlags)

Show a list of monitored masters and their state.

KeyValuePair<string, string>[][] SentinelMasters(CommandFlags flags = CommandFlags.None)

Parameters

flags CommandFlags

Returns

KeyValuePair<string, string>[][]

an array of master state KeyValuePair arrays

Remarks

SentinelMastersAsync(CommandFlags)

Show a list of monitored masters and their state.

Task<KeyValuePair<string, string>[][]> SentinelMastersAsync(CommandFlags flags = CommandFlags.None)

Parameters

flags CommandFlags

Returns

Task<KeyValuePair<string, string>[][]>

an array of master state KeyValuePair arrays

Remarks

SentinelSlaves(string, CommandFlags)

Show a list of slaves for this master, and their state.

KeyValuePair<string, string>[][] SentinelSlaves(string serviceName, CommandFlags flags = CommandFlags.None)

Parameters

serviceName string

the sentinel service name

flags CommandFlags

Returns

KeyValuePair<string, string>[][]

an array of slave state KeyValuePair arrays

Remarks

SentinelSlavesAsync(string, CommandFlags)

Show a list of slaves for this master, and their state.

Task<KeyValuePair<string, string>[][]> SentinelSlavesAsync(string serviceName, CommandFlags flags = CommandFlags.None)

Parameters

serviceName string

the sentinel service name

flags CommandFlags

Returns

Task<KeyValuePair<string, string>[][]>

an array of slave state KeyValuePair arrays

Remarks

Shutdown(ShutdownMode, CommandFlags)

Asks the redis server to shutdown, killing all connections. Please FULLY read the notes on the SHUTDOWN command.

void Shutdown(ShutdownMode shutdownMode = ShutdownMode.Default, CommandFlags flags = CommandFlags.None)

Parameters

shutdownMode ShutdownMode
flags CommandFlags

Remarks

SlaveOf(EndPoint, CommandFlags)

The SLAVEOF command can change the replication settings of a slave on the fly. If a Redis server is already acting as slave, specifying a null master will turn off the replication, turning the Redis server into a MASTER. Specifying a non-null master will make the server a slave of another server listening at the specified hostname and port.

void SlaveOf(EndPoint master, CommandFlags flags = CommandFlags.None)

Parameters

master EndPoint
flags CommandFlags

Remarks

SlaveOfAsync(EndPoint, CommandFlags)

The SLAVEOF command can change the replication settings of a slave on the fly. If a Redis server is already acting as slave, specifying a null master will turn off the replication, turning the Redis server into a MASTER. Specifying a non-null master will make the server a slave of another server listening at the specified hostname and port.

Task SlaveOfAsync(EndPoint master, CommandFlags flags = CommandFlags.None)

Parameters

master EndPoint
flags CommandFlags

Returns

Task

Remarks

SlowlogGet(int, CommandFlags)

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

CommandTrace[] SlowlogGet(int count = 0, CommandFlags flags = CommandFlags.None)

Parameters

count int
flags CommandFlags

Returns

CommandTrace[]

Remarks

SlowlogGetAsync(int, CommandFlags)

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

Task<CommandTrace[]> SlowlogGetAsync(int count = 0, CommandFlags flags = CommandFlags.None)

Parameters

count int
flags CommandFlags

Returns

Task<CommandTrace[]>

Remarks

SlowlogReset(CommandFlags)

You can reset the slow log using the SLOWLOG RESET command. Once deleted the information is lost forever.

void SlowlogReset(CommandFlags flags = CommandFlags.None)

Parameters

flags CommandFlags

Remarks

SlowlogResetAsync(CommandFlags)

You can reset the slow log using the SLOWLOG RESET command. Once deleted the information is lost forever.

Task SlowlogResetAsync(CommandFlags flags = CommandFlags.None)

Parameters

flags CommandFlags

Returns

Task

Remarks

SubscriptionChannels(RedisChannel, CommandFlags)

Lists the currently active channels. An active channel is a Pub/Sub channel with one ore more subscribers (not including clients subscribed to patterns).

RedisChannel[] SubscriptionChannels(RedisChannel pattern = default, CommandFlags flags = CommandFlags.None)

Parameters

pattern RedisChannel
flags CommandFlags

Returns

RedisChannel[]

a list of active channels, optionally matching the specified pattern.

Remarks

SubscriptionChannelsAsync(RedisChannel, CommandFlags)

Lists the currently active channels. An active channel is a Pub/Sub channel with one ore more subscribers (not including clients subscribed to patterns).

Task<RedisChannel[]> SubscriptionChannelsAsync(RedisChannel pattern = default, CommandFlags flags = CommandFlags.None)

Parameters

pattern RedisChannel
flags CommandFlags

Returns

Task<RedisChannel[]>

a list of active channels, optionally matching the specified pattern.

Remarks

SubscriptionPatternCount(CommandFlags)

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.

long SubscriptionPatternCount(CommandFlags flags = CommandFlags.None)

Parameters

flags CommandFlags

Returns

long

the number of patterns all the clients are subscribed to.

Remarks

SubscriptionPatternCountAsync(CommandFlags)

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.

Task<long> SubscriptionPatternCountAsync(CommandFlags flags = CommandFlags.None)

Parameters

flags CommandFlags

Returns

Task<long>

the number of patterns all the clients are subscribed to.

Remarks

SubscriptionSubscriberCount(RedisChannel, CommandFlags)

Returns the number of subscribers (not counting clients subscribed to patterns) for the specified channel.

long SubscriptionSubscriberCount(RedisChannel channel, CommandFlags flags = CommandFlags.None)

Parameters

channel RedisChannel
flags CommandFlags

Returns

long

Remarks

SubscriptionSubscriberCountAsync(RedisChannel, CommandFlags)

Returns the number of subscribers (not counting clients subscribed to patterns) for the specified channel.

Task<long> SubscriptionSubscriberCountAsync(RedisChannel channel, CommandFlags flags = CommandFlags.None)

Parameters

channel RedisChannel
flags CommandFlags

Returns

Task<long>

Remarks

Time(CommandFlags)

The TIME command returns the current server time.

DateTime Time(CommandFlags flags = CommandFlags.None)

Parameters

flags CommandFlags

Returns

DateTime

The server's current time.

Remarks

TimeAsync(CommandFlags)

The TIME command returns the current server time.

Task<DateTime> TimeAsync(CommandFlags flags = CommandFlags.None)

Parameters

flags CommandFlags

Returns

Task<DateTime>

The server's current time.

Remarks