23 lines
609 B
C#
23 lines
609 B
C#
using Mirea.Api.Endpoint.Configuration.ConfigurationChecks.Attributes;
|
|
using Mirea.Api.Endpoint.Configuration.ConfigurationChecks.Interfaces;
|
|
|
|
namespace Mirea.Api.Endpoint.Configuration.ConfigurationChecks.Settings;
|
|
|
|
[RequiredSettings]
|
|
public class CacheSettings : IIsConfigured
|
|
{
|
|
public enum CacheEnum
|
|
{
|
|
Memcached,
|
|
Redis
|
|
}
|
|
|
|
public CacheEnum TypeDatabase { get; set; }
|
|
public string? ConnectionString { get; set; }
|
|
|
|
public bool IsConfigured()
|
|
{
|
|
return TypeDatabase == CacheEnum.Memcached ||
|
|
!string.IsNullOrEmpty(ConnectionString);
|
|
}
|
|
} |