Change cache duration from minutes to days

Co-authored-by: clayschaad <11883505+clayschaad@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2025-08-24 17:12:34 +00:00
parent be741ca787
commit c8e5904775
4 changed files with 4 additions and 4 deletions

View file

@ -15,7 +15,7 @@
"MinBreakMinutes": 60,
"MaxEarlyArrivalMinutes": 60,
"MaxLateArrivalMinutes": 15,
"CacheDurationMinutes": 15
"CacheDurationDays": 1
},
"Shifts": [

View file

@ -37,7 +37,7 @@ namespace ShiftScheduler.Services
{
var cacheOptions = new MemoryCacheEntryOptions
{
AbsoluteExpirationRelativeToNow = TimeSpan.FromMinutes(config.CacheDurationMinutes)
AbsoluteExpirationRelativeToNow = TimeSpan.FromDays(config.CacheDurationDays)
};
cache.Set(cacheKey, apiResponse, cacheOptions);
}

View file

@ -9,7 +9,7 @@ namespace ShiftScheduler.Shared
public int MinBreakMinutes { get; set; } = 60;
public int MaxEarlyArrivalMinutes { get; set; } = 60;
public int MaxLateArrivalMinutes { get; set; } = 15;
public int CacheDurationMinutes { get; set; } = 15;
public int CacheDurationDays { get; set; } = 1;
}
public class TransportConnection

View file

@ -31,7 +31,7 @@ public class TransportServiceTests
MinBreakMinutes = 60,
MaxEarlyArrivalMinutes = 60,
MaxLateArrivalMinutes = 15,
CacheDurationMinutes = 15
CacheDurationDays = 1
};
_transportService = new TransportService(_httpClient, config, _memoryCache);