I need to use redis connection with Master and Slave configuration in dot net core.
Below code is configured to get the primary server(Master) which is configured to port 6379, and I have a slave configured to 6380.
services.AddSingleton < IDistributedCache > (serviceProvider => new RedisCache(new RedisCacheOptions { Configuration = primaryServer.ConnectionString, InstanceName = primaryServer.InstanceName }));
Below is the configuration:
"RedisSettings": { "PrimaryServer": { "ConnectionString": "127.0.0.1:6379", "InstanceName": "SomeName" }, "SecondaryServer": { "ConnectionString": "127.0.0.1:6380", "InstanceName": "SomeName" } }
Let me know if it is possible to have a master and slave setup for IDistributedCache