namespace WIDESEAWCS_RedisService.Options
|
{
|
public class RedisOptions
|
{
|
public bool Enabled { get; set; } = true;
|
|
public string ConnectionString { get; set; } = "127.0.0.1:6379,defaultDatabase=0,connectTimeout=5000,abortConnect=false";
|
|
public string InstanceName { get; set; } = "WIDESEAWCS:";
|
|
public int DefaultDatabase { get; set; } = 0;
|
|
public bool EnableSentinel { get; set; } = false;
|
|
public string SentinelMasterName { get; set; } = "mymaster";
|
|
public List<string> SentinelEndpoints { get; set; } = new();
|
|
public int PoolSize { get; set; } = 10;
|
|
public int ConnectRetry { get; set; } = 3;
|
|
public string SerializerType { get; set; } = "Newtonsoft";
|
|
public bool FallbackToMemory { get; set; } = true;
|
|
public string KeyPrefix { get; set; } = "wcs:";
|
|
public MonitoringOptions Monitoring { get; set; } = new();
|
|
public EvictionOptions Eviction { get; set; } = new();
|
}
|
|
public class MonitoringOptions
|
{
|
public bool Enabled { get; set; } = false;
|
|
public int SlowLogThresholdMs { get; set; } = 100;
|
|
public int HealthCheckIntervalSeconds { get; set; } = 30;
|
}
|
|
public class EvictionOptions
|
{
|
public int DefaultExpirationSeconds { get; set; } = 3600;
|
|
public string MaxMemoryPolicy { get; set; } = "allkeys-lru";
|
}
|
}
|