예제 #1
0
        public async Task <ActionResult <bool> > Connect([FromBody] RedisConnectionRequest redisConnectionRequest)
        {
            var options = new ConfigurationOptions
            {
                AbortOnConnectFail = false,
                Ssl            = true,
                Password       = redisConnectionRequest.Password,
                ConnectTimeout = 60000,
                SyncTimeout    = 60000,
                SslProtocols   = System.Security.Authentication.SslProtocols.Tls12
            };

            options.EndPoints.Add(redisConnectionRequest.Host, 6380);

            await connectionProvider.ConnectAsync("test", options);

            return(true);
        }