opt:优化null 缓存5s

This commit is contained in:
李鹏军 2024-04-09 14:33:40 +08:00
parent 4fbbbd0566
commit d7cfd153b2

View File

@ -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;
}