Skip to main content

RedisConfig

Assembly: ServiceStack.Redis.dll
View Source
Declaration
public class RedisConfig

Properties

BufferLength

The Byte Buffer Size to combine Redis Operations within (1450 bytes)

View Source
Declaration
public static int BufferLength { get; }

DisableVerboseLogging

View Source
Declaration
[Obsolete("Use EnableVerboseLogging")]
public static bool DisableVerboseLogging { get; set; }

CertificateSelectionCallback

View Source
Declaration
public static LocalCertificateSelectionCallback CertificateSelectionCallback { get; set; }

CertificateValidationCallback

View Source
Declaration
public static RemoteCertificateValidationCallback CertificateValidationCallback { get; set; }

Fields

DefaultDb

View Source
Declaration
public const long DefaultDb = 0L

DefaultPort

View Source
Declaration
public const int DefaultPort = 6379

DefaultPortSsl

View Source
Declaration
public const int DefaultPortSsl = 6380

DefaultPortSentinel

View Source
Declaration
public const int DefaultPortSentinel = 26379

DefaultHost

View Source
Declaration
public const string DefaultHost = "localhost"

ClientFactory

Factory used to Create RedisClient instances

View Source
Declaration
public static Func<RedisEndpoint, RedisClient> ClientFactory

DefaultConnectTimeout

The default RedisClient Socket ConnectTimeout (default -1, None)

View Source
Declaration
public static int DefaultConnectTimeout

DefaultSendTimeout

The default RedisClient Socket SendTimeout (default -1, None)

View Source
Declaration
public static int DefaultSendTimeout

DefaultReceiveTimeout

The default RedisClient Socket ReceiveTimeout (default -1, None)

View Source
Declaration
public static int DefaultReceiveTimeout

DefaultIdleTimeOutSecs

Default Idle TimeOut before a connection is considered to be stale (default 240 secs)

View Source
Declaration
public static int DefaultIdleTimeOutSecs

DefaultRetryTimeout

The default RetryTimeout for auto retry of failed operations (default 10,000ms)

View Source
Declaration
public static int DefaultRetryTimeout

DefaultMaxPoolSize

Default Max Pool Size for Pooled Redis Client Managers (default none)

View Source
Declaration
public static int? DefaultMaxPoolSize

DefaultPoolSizeMultiplier

The default pool size multiplier if no pool size is specified (default 50)

View Source
Declaration
public static int DefaultPoolSizeMultiplier

BackOffMultiplier

The BackOff multiplier failed Auto Retries starts from (default 10ms)

View Source
Declaration
public static int BackOffMultiplier

BufferPoolMaxSize

The Byte Buffer Size for Operations to use a byte buffer pool (default 500kb)

View Source
Declaration
public static int BufferPoolMaxSize

CommandKeysBatchSize

Batch size of keys to include in a single Redis Command (e.g. DEL k1 k2...)

View Source
Declaration
public static int CommandKeysBatchSize

VerifyMasterConnections

Whether Connections to Master hosts should be verified they're still master instances (default true)

View Source
Declaration
public static bool VerifyMasterConnections

RetryReconnectOnFailedMasters

Whether to retry re-connecting on same connection if not a master instance (default true) For Managed Services (e.g. AWS ElastiCache) which eventually restores master instances on same host

View Source
Declaration
public static bool RetryReconnectOnFailedMasters

HostLookupTimeoutMs

The ConnectTimeout on clients used to find the next available host (default 200ms)

View Source
Declaration
public static int HostLookupTimeoutMs

AssumeServerVersion

Skip ServerVersion Checks by specifying Min Version number, e.g: 2.8.12 => 2812, 2.9.1 => 2910

View Source
Declaration
public static int? AssumeServerVersion

DeactivatedClientsExpiry

How long to hold deactivated clients for before disposing their connection (default 0 seconds) Dispose of deactivated Clients immediately with TimeSpan.Zero

View Source
Declaration
public static TimeSpan DeactivatedClientsExpiry

EnableVerboseLogging

Whether Debug Logging should log detailed Redis operations (default false)

View Source
Declaration
public static bool EnableVerboseLogging

AssertAccessOnlyOnSameThread

Assert all access using pooled RedisClient instance should be limited to same thread. Captures StackTrace so is very slow, use only for debugging connection issues.

View Source
Declaration
public static bool AssertAccessOnlyOnSameThread

Methods

Reset()

Resets Redis Config and Redis Stats back to default values

View Source
Declaration
public static void Reset()