Redis provider settings reference

Last updated Monday, May 14, 2018 in Sitecore Experience Platform for Developer
Keywords: Cloud, xDB

Use the following configuration options when you configure a shared or private session state in Sitecore:



For example

connectionString (1)

Contains the connection string that Sitecore uses to connect to the session database.

Edit to specify the session state database that you want to use.

You can use a connection string name from connectionString or a valid StackExchange.Redis connection string.




Indicates that you want session state data to be compressed.

The default value is 'false'. Compressing session state data reduces the amount of data that you need to transfer between the database and the Sitecore instance. This may cause some additional CPU overhead.


settingsClassName (2)

Contains an assembly qualified class name that includes the settingsMethod, and returns the 'connectionString' value.

settingsClassName="Sitecore.SessionProvider.Redis.Settings, Sitecore.SessionProvider.Redis"

settingsMethodName (2)

Contains a method name that is defined in the settingsClass. The name must not require any parameters, it must be public, static, and have a return type of [String], which is the 'connectionString' value.


host (3)

Specifies your cache endpoint.


port (3)

Uses either your non-ssl port or your ssl port, depending on the ssl settings.


accessKey (3)

Uses either the primary or secondary access key for your cache.

accessKey=" STKNJnBR9/DGaNoOATadRu/RY3PFFEZ7Xshk8B5NjNc="

ssl (3)

Secures that the cache/client communicates with ssl, if you ensure the value is set to 'true'. Otherwise set the value to 'false'. The default value is 'true'.


Make sure you specify the correct port.


connectionTimeoutInmilliseconds (3)

Allows you to override the connectTimeout setting in the StackExchange.Redis client. If the value is not specified, the default connectTimeout value is '5000'. For more information, see the StackExchange.Redis configuration model.

connectionTimeoutInMilliseconds = "5000"

operationTimeoutInMilliseconds (3)

Allows you to override the syncTimeout setting in the StackExchange.Redis client. If the timeout is not specified, the default syncTimeout value is '1000'. For more information, see the StackExchange.Redis configuration model.

operationTimeoutInMilliseconds = "1000"


Specifies whether to throw an exception in the event of a failure if you set the value to 'true'. If you want the operation to fail silently, set the value to 'false'. The default value is 'true'.



Specifies the maximum duration for the failed operations to retry during the retryTimeoutInMilliseconds interval. The first retry occurs after 20 milliseconds, then every second until the retryTimeoutInMilliseconds interval expires. Immediately after this interval, the operation retries one last time; if the operation still fails, the exception throws back to the caller (depending on the throwOnError setting). The default value is '5000'.



Specifies which database to use for the cache output data. If a database is not specified, the default value is '0'.



Indicates whether the type of session state is private or shared. The default is empty.



Specifies whether to enable processing of expired sessions. The default value is 'true'.



Specifies the time interval in seconds that the session state provider uses to check if any sessions have expired. The default value is '2'



Specifies the number of keys iterated with every call to the Redis cache, when you retrieve keys from the key space. The default value is '200', but this is just a hint. For more information on the Count and Match options while using SCAN, see:



Specifies the interval of time that the expired session is locked, (so that it is not used during Session End processing). The default value in seconds is '120'.



Limits the number of expired sessions that are processed per second. The default value is '0'.


The value '0' disables limiting.



(1) Specify the 'Redis' connection string in connectionString.

(2) (Optional) Instead of using the connectionString configuration, you can use: settingsClassName, settingsMethodName.

(3) (Optional) Instead of using the connectionString configuration, you can use: host, port, accessKey, ssl, connectionTimeoutInMilliseconds, and operationTimeoutInMilliseconds.

For further information use the walkthrough: configuring a shared session state database using the Redis provider or the walkthrough: configuring a private session state database using the Redis provider.

Send feedback about the documentation to