diff --git a/Waste.Application/ThirdApiInfo/OpenService.cs b/Waste.Application/ThirdApiInfo/OpenService.cs index 90b9023..00deb4c 100644 --- a/Waste.Application/ThirdApiInfo/OpenService.cs +++ b/Waste.Application/ThirdApiInfo/OpenService.cs @@ -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];