Skip to content

Commit

Permalink
minor time to live provider change
Browse files Browse the repository at this point in the history
  • Loading branch information
devhl-labs committed Dec 13, 2023
1 parent 3ac464b commit 0354cf4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/CocApi.Cache/Common/TimeToLiveProvider.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using System;
using System.Net;
using System.Threading.Tasks;
using CocApi.Rest.Apis;
using CocApi.Rest.Client;
using CocApi.Rest.Models;
using Microsoft.Extensions.Logging;
Expand Down Expand Up @@ -86,7 +85,7 @@ protected virtual ValueTask<TimeSpan> TimeToLiveAsync<T>(IOk<T> apiResponse) whe

if (!Clash.IsCwlEnabled ||
(model?.State == Rest.Models.GroupState.Ended && DateTime.UtcNow.Month == model.Season.Month) ||
(model == null && DateTime.UtcNow.Day >= 3))
(model == null && DateTime.UtcNow.Day >= 4))
return new ValueTask<TimeSpan>(
new DateTime(DateTime.UtcNow.Year, DateTime.UtcNow.Month, 1)
.AddMonths(1)
Expand Down

0 comments on commit 0354cf4

Please sign in to comment.