Altri expire TTL

This commit is contained in:
Samuele Locatelli
2026-06-11 11:21:24 +02:00
parent bd583a59fe
commit d447b5501f
+6
View File
@@ -166,6 +166,9 @@ namespace MP.RIOC.Services
var daysIndex = DaysIndexKey(dest, machineId);
var dayScore = ToEpochSeconds(dayStart);
// 5. Imposta TTL 30 giorni anche sulle chiavi index per pulizia automatica
tasks.Add(batch.KeyExpireAsync(hoursIndex, TimeSpan.FromDays(30)));
if (!dailyAggregates.TryGetValue(dayKey, out var agg))
{
agg = new AggregatedStats();
@@ -206,6 +209,9 @@ namespace MP.RIOC.Services
agg.NoReply.ToString(CultureInfo.InvariantCulture),
SentinelValue
}));
// Imposta TTL 30 giorni su bucket daily aggregato
tasks.Add(batch.KeyExpireAsync(key, TimeSpan.FromDays(30)));
}
// Esegui tutto il batch in un unico round-trip