From 4d4b7c4cd0e98df8c59aef737c8ed8bd7d7a1320 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Fri, 19 May 2023 08:09:18 +0200 Subject: [PATCH] Cache DDF --> settimana --- WebDoorCreator.Data/Services/QueueDataService.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/WebDoorCreator.Data/Services/QueueDataService.cs b/WebDoorCreator.Data/Services/QueueDataService.cs index 4af7007..0e85eaf 100644 --- a/WebDoorCreator.Data/Services/QueueDataService.cs +++ b/WebDoorCreator.Data/Services/QueueDataService.cs @@ -717,7 +717,7 @@ namespace WebDoorCreator.Data.Services // salvo nell'archivio REDIS delle porte il DDF corrente (key=doorId.versNumb), potrebbe // venire buono anche x eventuale UNDO... RedisKey currDdfKey = new RedisKey($"{Constants.CALC_REQ_DDF_CACHE}:{sDoorId}:{sCurrVers}"); - await redisDb.StringSetAsync(currDdfKey, FullDDF, DayLongCache); + await redisDb.StringSetAsync(currDdfKey, FullDDF, WeekLongCache); // invio sul canale dei messaggi il numero di items in coda attuali x chiedere esecuzione... long numPending = await NumRequestPending(); @@ -1033,6 +1033,13 @@ namespace WebDoorCreator.Data.Services { get => TimeSpan.FromHours(24 * 7); } + /// + /// Durata cache di 24h + /// + private TimeSpan MonthLongCache + { + get => TimeSpan.FromDays(30); + } #endregion Private Properties