From 2f8d5c8dd79f836b5d92e9a77987f826a65253b2 Mon Sep 17 00:00:00 2001 From: devhl Date: Thu, 4 Apr 2024 21:23:53 -0400 Subject: [PATCH] possible bug fix --- src/CocApi.Cache/CocApi.Cache.csproj | 2 +- src/CocApi.Cache/Services/ClanService.cs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/CocApi.Cache/CocApi.Cache.csproj b/src/CocApi.Cache/CocApi.Cache.csproj index d11366c..768debb 100644 --- a/src/CocApi.Cache/CocApi.Cache.csproj +++ b/src/CocApi.Cache/CocApi.Cache.csproj @@ -6,7 +6,7 @@ devhl Caches response from the Clash of Clans API. - 2.11.6-debug.4 + 2.11.6-debug.5 2.0.0.0 2.0.0.0 true diff --git a/src/CocApi.Cache/Services/ClanService.cs b/src/CocApi.Cache/Services/ClanService.cs index 8877ff5..7b0e843 100644 --- a/src/CocApi.Cache/Services/ClanService.cs +++ b/src/CocApi.Cache/Services/ClanService.cs @@ -237,7 +237,8 @@ private void ExtendWarTTLWhileInCwl(CachedClan cachedClan) cachedClan.Group.Content == null || cachedClan.Group.Content.State == Rest.Models.GroupState.Ended || cachedClan.Group.Content.Season.Month < DateTime.UtcNow.Month || - (cachedClan.Group.KeepUntil.HasValue && cachedClan.Group.KeepUntil.Value.Month > DateTime.UtcNow.Month)) + (cachedClan.Group.KeepUntil.HasValue && cachedClan.Group.KeepUntil.Value.Month > DateTime.UtcNow.Month) || + cachedClan.Group.DownloadedAt < DateTime.UtcNow.AddDays(-7)) return; // keep currentwar around an arbitrary amount of time since we are in cwl