Cache DDF --> settimana

This commit is contained in:
Samuele Locatelli
2023-05-19 08:09:18 +02:00
parent 014a52ad34
commit 4d4b7c4cd0
@@ -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);
}
/// <summary>
/// Durata cache di 24h
/// </summary>
private TimeSpan MonthLongCache
{
get => TimeSpan.FromDays(30);
}
#endregion Private Properties