2024-10-07 02:13:35 +03:00
|
|
|
|
using Mirea.Api.Endpoint.Configuration.ConfigurationChecks.Attributes;
|
|
|
|
|
using Mirea.Api.Endpoint.Configuration.ConfigurationChecks.Interfaces;
|
2024-05-28 06:38:24 +03:00
|
|
|
|
|
2024-10-07 02:13:35 +03:00
|
|
|
|
namespace Mirea.Api.Endpoint.Configuration.ConfigurationChecks.Settings;
|
2024-05-28 06:38:24 +03:00
|
|
|
|
|
|
|
|
|
[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);
|
|
|
|
|
}
|
|
|
|
|
}
|