=== Summary: 675 files | 7 generated | 484 fresh | 4605 untracked | 4268 adopted | 355 marked | 466 validated-ok | 2+0 stale (sig+body) | 0 skipped | 0 failed | elapsed 11:08:11.442 (40091.44s) ===
This commit is contained in:
@@ -10,6 +10,7 @@ namespace adas_core.Domain.Models.AppSettings
|
||||
/// - TTL global y por entidad
|
||||
/// - Generación de claves CacheKeys
|
||||
/// </summary>
|
||||
/// <!-- aidoc:v1 sig=5ed70a1 -->
|
||||
public class RedisSettings
|
||||
{
|
||||
// Conexión y networking
|
||||
@@ -30,6 +31,7 @@ namespace adas_core.Domain.Models.AppSettings
|
||||
/// <summary>
|
||||
/// Represents a Redis server endpoint, typically used to encapsulate connection details such as host, port, and credentials required to connect to a Redis instance.
|
||||
/// </summary>
|
||||
/// <!-- aidoc:v1 sig=1bcefd5 -->
|
||||
public class RedisEndpoint
|
||||
{
|
||||
public string Host { get; set; } = null!;
|
||||
@@ -42,6 +44,7 @@ namespace adas_core.Domain.Models.AppSettings
|
||||
/// <summary>
|
||||
/// Provides static cache key constants used throughout the application to ensure consistent key naming when storing and retrieving cached data.
|
||||
/// </summary>
|
||||
/// <!-- aidoc:v1 sig=6c8a7c2 -->
|
||||
public static class CacheKeys
|
||||
{
|
||||
// ----------------- Patients -----------------
|
||||
@@ -50,6 +53,7 @@ namespace adas_core.Domain.Models.AppSettings
|
||||
/// </summary>
|
||||
/// <param name="patientId">The unique identifier of the patient to be included in the formatted string.</param>
|
||||
/// <returns>A string in the format "patients:{patientId}" representing the patient resource key.</returns>
|
||||
/// <!-- aidoc:v1 sig=a34b787 -->
|
||||
public static string Patient(string patientId)
|
||||
=> $"patients:{patientId}";
|
||||
|
||||
@@ -59,6 +63,7 @@ namespace adas_core.Domain.Models.AppSettings
|
||||
/// </summary>
|
||||
/// <param name="id">The unique identifier of the config display to include in the key.</param>
|
||||
/// <returns>A formatted key string in the form <c>configDisplays:{id}</c> suitable for lookup or caching.</returns>
|
||||
/// <!-- aidoc:v1 sig=4d38573 -->
|
||||
public static string ConfigDisplay(string id)
|
||||
=> $"configDisplays:{id}";
|
||||
|
||||
@@ -66,6 +71,7 @@ namespace adas_core.Domain.Models.AppSettings
|
||||
/// Returns the configuration key representing the "all displays" setting, typically used to request or identify the display configuration for all available displays.
|
||||
/// </summary>
|
||||
/// <returns>The string identifier "configDisplays:all" used to reference the all-displays configuration.</returns>
|
||||
/// <!-- aidoc:v1 sig=6e48d03 -->
|
||||
public static string ConfigDisplaysAll()
|
||||
=> "configDisplays:all";
|
||||
|
||||
@@ -75,6 +81,7 @@ namespace adas_core.Domain.Models.AppSettings
|
||||
/// </summary>
|
||||
/// <param name="obsId">The observation identifier to include in the formatted result.</param>
|
||||
/// <returns>A formatted string in the form "pumpObs:{obsId}".</returns>
|
||||
/// <!-- aidoc:v1 sig=88326ef -->
|
||||
public static string PumpObservation(string obsId)
|
||||
=> $"pumpObs:{obsId}";
|
||||
|
||||
@@ -84,6 +91,7 @@ namespace adas_core.Domain.Models.AppSettings
|
||||
/// <param name="pumpId">The unique identifier of the pump used in the composed key.</param>
|
||||
/// <param name="date">The observation date whose year, month, and day are formatted into the key.</param>
|
||||
/// <returns>A string in the form <c>pumpObs:pump:{pumpId}:{yyyyMMdd}</c> representing the daily pump observation key.</returns>
|
||||
/// <!-- aidoc:v1 sig=4367dcb -->
|
||||
public static string PumpDaily(string pumpId, DateTime date)
|
||||
=> $"pumpObs:pump:{pumpId}:{date:yyyyMMdd}";
|
||||
|
||||
@@ -93,6 +101,7 @@ namespace adas_core.Domain.Models.AppSettings
|
||||
/// </summary>
|
||||
/// <param name="apptId">The unique identifier of the appointment.</param>
|
||||
/// <returns>A formatted string in the form "appointments:{apptId}".</returns>
|
||||
/// <!-- aidoc:v1 sig=1b8e8d2 -->
|
||||
public static string Appointment(string apptId)
|
||||
=> $"appointments:{apptId}";
|
||||
|
||||
@@ -103,6 +112,7 @@ namespace adas_core.Domain.Models.AppSettings
|
||||
/// <param name="patientId">The unique identifier of the patient whose appointments are being addressed.</param>
|
||||
/// <param name="date">The date for which the appointments are being requested.</param>
|
||||
/// <returns>A formatted cache key string combining the patient identifier and the day in <c>yyyyMMdd</c> format.</returns>
|
||||
/// <!-- aidoc:v1 sig=657fef9 -->
|
||||
public static string AppointmentsByPatientDay(string patientId, DateTime date)
|
||||
=> $"appointments:patient:{patientId}:{date:yyyyMMdd}";
|
||||
|
||||
@@ -113,6 +123,7 @@ namespace adas_core.Domain.Models.AppSettings
|
||||
/// <param name="patientId">The identifier of the patient whose appointments are being queried.</param>
|
||||
/// <param name="date">The date whose year and month determine the appointment period encoded in the key.</param>
|
||||
/// <returns>A formatted string in the form <c>appointments:patient:{patientId}:{yyyyMM}</c> suitable for use as a cache key.</returns>
|
||||
/// <!-- aidoc:v1 sig=9218fd1 -->
|
||||
public static string AppointmentsByPatientMonth(string patientId, DateTime date)
|
||||
=> $"appointments:patient:{patientId}:{date:yyyyMM}";
|
||||
|
||||
@@ -123,6 +134,7 @@ namespace adas_core.Domain.Models.AppSettings
|
||||
/// <param name="patientId">The unique identifier of the patient whose observations are being referenced.</param>
|
||||
/// <param name="groupedField">The optional field used to group the observations; may be null.</param>
|
||||
/// <returns>A formatted string in the pattern "groupedObs:{groupedField}:patient:{patientId}".</returns>
|
||||
/// <!-- aidoc:v1 sig=14698da -->
|
||||
public static string GroupedObservationsByPatient(string patientId, string? groupedField)
|
||||
=> $"groupedObs:{groupedField}:patient:{patientId}";
|
||||
|
||||
@@ -133,6 +145,7 @@ namespace adas_core.Domain.Models.AppSettings
|
||||
/// <param name="groupedField">The field name used to group the observations.</param>
|
||||
/// <param name="date">The observation date, formatted as <c>yyyyMMdd</c> in the generated key.</param>
|
||||
/// <returns>A cache key string in the format <c>groupedObs:{groupedField}:patient:{patientId}:{yyyyMMdd}</c>.</returns>
|
||||
/// <!-- aidoc:v1 sig=b28a057 -->
|
||||
public static string GroupedObservationsByPatientDay(string patientId, string groupedField, DateTime date)
|
||||
=> $"groupedObs:{groupedField}:patient:{patientId}:{date:yyyyMMdd}";
|
||||
|
||||
@@ -143,6 +156,7 @@ namespace adas_core.Domain.Models.AppSettings
|
||||
/// <param name="groupedField">The observation field used as the grouping criterion.</param>
|
||||
/// <param name="date">The date used to derive the month bucket (formatted as yyyyMM) for the cache key.</param>
|
||||
/// <returns>A formatted cache key string in the form <c>groupedObs:{groupedField}:patient:{patientId}:{yyyyMM}</c>.</returns>
|
||||
/// <!-- aidoc:v1 sig=029e2f4 -->
|
||||
public static string GroupedObservationsByPatientMonth(string patientId, string groupedField, DateTime date)
|
||||
=> $"groupedObs:{groupedField}:patient:{patientId}:{date:yyyyMM}";
|
||||
|
||||
@@ -153,6 +167,7 @@ namespace adas_core.Domain.Models.AppSettings
|
||||
/// <param name="groupedField">The field used to group the observations.</param>
|
||||
/// <param name="take">The maximum number of latest observations to include in the cache key.</param>
|
||||
/// <returns>A formatted cache key string identifying the patient's latest grouped observations.</returns>
|
||||
/// <!-- aidoc:v1 sig=8f5c768 -->
|
||||
public static string GroupedObservationsLatest(string patientId, string groupedField, int take)
|
||||
=> $"groupedObs:{groupedField}:patient:{patientId}:latest:{take}";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user