This repository has been archived by the owner on Dec 24, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 876
Redis Config
Demis Bellot edited this page Sep 2, 2015
·
3 revisions
The RedisConfig
static class provides an alternative to Redis Connection Strings to
configure the default RedisClient settings. Each config option is
documented on the RedisConfig class
with the defaults shown below:
class RedisConfig
{
DefaultConnectTimeout = -1
DefaultSendTimeout = -1
DefaultReceiveTimeout = -1
DefaultRetryTimeout = 3 * 1000
DefaultIdleTimeOutSecs = 240
BackOffMultiplier = 10
BufferLength = 1450
BufferPoolMaxSize = 500000
VerifyMasterConnections = true
HostLookupTimeoutMs = 200
AssumeServerVersion = null
DeactivatedClientsExpiry = TimeSpan.FromMinutes(1)
DisableVerboseLogging = false
}
One option you may want to set is AssumeServerVersion
with the version of Redis Server version you're running, e.g:
RedisConfig.AssumeServerVersion = 2812; //2.8.12
RedisConfig.AssumeServerVersion = 3030; //3.0.3
This is used to change the behavior of a few API's to use the most optimal Redis Operation for their server version. Setting this will save an additional INFO lookup each time a new RedisClient Connection is opened.