Skip to content

For Redis caching where is the config can i set my certificate path? #563

Open
@5Gears0Chill

Description

@5Gears0Chill

New to Redis, apologies if i am not understanding

the redis application i need to connect to requires SSL

private static IServiceCollection RegisterRedisCache(this IServiceCollection services, IConfiguration configuration)
        {
            _ = services.AddEasyCaching(options =>
            {
                Action<EasyCaching.Serialization.Json.EasyCachingJsonSerializerOptions> easycaching = x =>
                {
                    x.NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore;
                    x.ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Ignore;
                };
                _ = options.WithJson(easycaching, "MY_INSTANCE");
                
                options.UseRedis(config =>
                {
                    config.DBConfig = new RedisDBOptions
                    {
                        Username = "username",
                        Password = "password",
                        IsSsl = true,                        
                        SslHost = "hosturl here",
                        ConnectionTimeout = 5000,
                        Database = 0,
                    };
                    config.DBConfig.Endpoints.Add(new ServerEndPoint("host url here", port here));
                    config.EnableLogging = true;                    
                }, "MY_INSTANCE");
            });
            return services;
        }

but they say this

The SSL encryption for your database connection is enabled by default. The CA Certificate is required for connection.

please can someone explain to me how to add my certificate

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions