From d7cfd153b259b2cc07dac80a2d93a592125a0676 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=86=9B?= <2357729423@qq.com> Date: Tue, 9 Apr 2024 14:33:40 +0800 Subject: [PATCH] =?UTF-8?q?opt=EF=BC=9A=E4=BC=98=E5=8C=96null=20=E7=BC=93?= =?UTF-8?q?=E5=AD=985s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Services/TrackPush/TrackPushCacheService.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/SJZY.Track.Application/Services/TrackPush/TrackPushCacheService.cs b/src/SJZY.Track.Application/Services/TrackPush/TrackPushCacheService.cs index bf365f28..eb4c2504 100644 --- a/src/SJZY.Track.Application/Services/TrackPush/TrackPushCacheService.cs +++ b/src/SJZY.Track.Application/Services/TrackPush/TrackPushCacheService.cs @@ -35,9 +35,11 @@ public class TrackPushCacheService : ITrackPushCacheService, ITransientDependenc { // maybe is null var data = await DoGetPushContentConfigsAsync(subSystemId, customId); + var ttl = 3 * 24 * 60 * 60; + if (data == null) ttl = 5; // ttl 3days await RedisHelper.Client.SetAsync(TrackPushContentKey(subSystemId, customId), - data, 3 * 24 * 60 * 60); + data, ttl); return data; }