临时数据清理缓存
This commit is contained in:
parent
39c3bfa21f
commit
09ad0dfdfe
|
|
@ -413,6 +413,7 @@ namespace Waste.Application.ThirdApiInfo
|
|||
var databytes = await _cahce.GetAsync(result.sn);
|
||||
if (databytes != null && databytes.Length > 0)
|
||||
{
|
||||
await _cahce.RemoveAsync(result.sn);
|
||||
byte[] newval = new byte[databytes.Length + result.databyte.Length];
|
||||
databytes.CopyTo(newval, 0);
|
||||
result.databyte.CopyTo(newval, databytes.Length);
|
||||
|
|
@ -441,7 +442,7 @@ namespace Waste.Application.ThirdApiInfo
|
|||
else
|
||||
{
|
||||
var val = await _cahce.GetAsync(result.sn);
|
||||
var time = new DistributedCacheEntryOptions().SetSlidingExpiration(TimeSpan.FromSeconds(10));
|
||||
var time = new DistributedCacheEntryOptions().SetSlidingExpiration(TimeSpan.FromSeconds(30));
|
||||
if (val != null && val.Length > 0)
|
||||
{
|
||||
byte[] newval = new byte[val.Length + result.databyte.Length];
|
||||
|
|
|
|||
Loading…
Reference in New Issue