Configuring Redis Caching - Akumina Community

Configuring Redis Caching

1. Interchange.settings.config

Add update the following key <add key=”akumina:PrimaryRedisConnection” value=”YOUR CONNECTION STRING“/>

OPTIONAL – READONLY CLUSTER CONFIGURATION

<add key=”akumina:SecondaryRedisConnection” value=”THIS KEY IS NOT REQUIRED FOR PRIMARY ONLY DEPLOYMENT“/>

2. Unity.config

a. From caching container uncomment “RedisCachingService” and comment other providers

3. OPTIONAL STEP – only required if you want to use REDIS Session State provider

  1. Open web.config
  2. Comment the InProc session state
  3. Uncomment the commented lines to enable session state provider
  4. Replace your host, password and port

4. OPTIONAL STEP The following AppSettings keys in interchange.settings.config are optional

<!–PartitionKey, all cache will be partitioned by this prefix.–>

<add key=”akumina:RedisCachePartitionKey” value=”akcache:”/>

<!–RedisTokenCacheExpirationMode, when to expire the cache, possible values are None, Absolute, Sliding–>

<add key=”akumina:RedisTokenCacheExpirationMode” value=”Never“/>

<!–SecondaryRedisConnectionString, This key is required on clustered configureation. value will be connection string to readonly node–>

<add key=”akumina:SecondaryRedisConnectionString” value=””/>

 

5. OPTIONAL STEP: Configuring Redis as a Token store, open unity.config and change the following

register typeIRepository[UserToken]” mapTo=”AzureTableTokenStore” />

TO

<register IRepository[UserToken]” mapTo=”RedisTokenStore” />

6. If you get timeout error while debugging, you can add “synctimeout=30000” at the end of the connection string. By setting this value you are increasing timeout from 1 sec to 30 sec

Views: 907
//]]>