using adas_core.Domain.Enums; namespace adas_core.Domain.Models.AppSettings; public class CacheSettings { /// /// Activa o desactiva por completo el sistema de caché. /// Si es false, se usará NoCacheService para todas las entidades. /// public bool IsEnabled { get; set; } = true; // Cada propiedad define cómo debe cachearse la entidad correspondiente: // CacheMode None → no cachea nunca // CacheMode Cache → in-memory (CacheService) // CacheMode Redis → RedisService public CacheEnum.Mode Patients { get; set; } = CacheEnum.Mode.Cache; public CacheEnum.Mode Displays { get; set; } = CacheEnum.Mode.Cache; public CacheEnum.Mode PumpObservations { get; set; } = CacheEnum.Mode.Cache; public CacheEnum.Mode Appointments { get; set; } = CacheEnum.Mode.Cache; public CacheEnum.Mode PointOfCares { get; set; } = CacheEnum.Mode.Cache; public CacheEnum.Mode GroupedObservations { get; set; } = CacheEnum.Mode.Cache; public CacheEnum.Mode PatientObservations { get; set; } = CacheEnum.Mode.Cache; public CacheEnum.Mode ConfigObservations { get; set; } = CacheEnum.Mode.Cache; // Configuración específica del backend InMemory public InMemorySettings InMemory { get; set; } = new(); // Configuración específica del backend Redis public RedisSettings Redis { get; set; } = new(); } // -------------------- InMemory Cache -------------------- public class InMemorySettings { public TtlSettings Ttl { get; set; } = new(); } // -------------------- TTL por entidad -------------------- public class TtlSettings { public int? GlobalSeconds { get; set; } public int? PatientsSeconds { get; set; } public int? DisplaysSeconds { get; set; } public int? PumpObservationsSeconds { get; set; } public int? AppointmentsSeconds { get; set; } public int? ConfigObservationsSeconds { get; set; } public int? PointOfCaresSeconds { get; set; } public int? GroupedObservationsSeconds { get; set; } public int? PatientObservationsSeconds { get; set; } }