feat(core, infrastructure): IRedisCacheService - данные теперь можно архивировать
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using NodaTime;
|
||||
using PARR.Core.Common.Interfaces;
|
||||
using PARR.Core.Repositories.Interfaces;
|
||||
using PARR.Core.Services.Shortcodes;
|
||||
@@ -308,7 +307,7 @@ namespace PARR.Core.Services.Workload.Implementations
|
||||
{
|
||||
var key = GetReportCacheKey(reportType, dateStart, durationDays, offset, filterParam);
|
||||
|
||||
return await redisCacheService.GetCachedDataAsync<WorkloadReport>(key);
|
||||
return await redisCacheService.GetCachedDataAsync<WorkloadReport>(key, true);
|
||||
}
|
||||
|
||||
|
||||
@@ -325,7 +324,7 @@ namespace PARR.Core.Services.Workload.Implementations
|
||||
public async Task SetWorkloadReport(WorkloadReport report, WorkloadReportType reportType, DateOnly dateStart, int durationDays, TimeSpan offset, string? filterParam)
|
||||
{
|
||||
var key = GetReportCacheKey(reportType, dateStart, durationDays, offset, filterParam);
|
||||
await redisCacheService.SetCachedDataAsync(key, report, cacheWorkloadTtl);
|
||||
await redisCacheService.SetCachedDataAsync(key, report, cacheWorkloadTtl, true);
|
||||
}
|
||||
|
||||
|
||||
@@ -377,11 +376,5 @@ namespace PARR.Core.Services.Workload.Implementations
|
||||
|
||||
return keyStr;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user