opt:优化null 缓存5s
This commit is contained in:
parent
4fbbbd0566
commit
d7cfd153b2
@ -35,9 +35,11 @@ public class TrackPushCacheService : ITrackPushCacheService, ITransientDependenc
|
|||||||
{
|
{
|
||||||
// maybe is null
|
// maybe is null
|
||||||
var data = await DoGetPushContentConfigsAsync(subSystemId, customId);
|
var data = await DoGetPushContentConfigsAsync(subSystemId, customId);
|
||||||
|
var ttl = 3 * 24 * 60 * 60;
|
||||||
|
if (data == null) ttl = 5;
|
||||||
// ttl 3days
|
// ttl 3days
|
||||||
await RedisHelper.Client.SetAsync(TrackPushContentKey(subSystemId, customId),
|
await RedisHelper.Client.SetAsync(TrackPushContentKey(subSystemId, customId),
|
||||||
data, 3 * 24 * 60 * 60);
|
data, ttl);
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user