From 09ad0dfdfe5f5c4b4e06d24be87471892ec9cb4f Mon Sep 17 00:00:00 2001 From: Hinse <756681202@qq.com> Date: Wed, 30 Mar 2022 10:49:47 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=B4=E6=97=B6=E6=95=B0=E6=8D=AE=E6=B8=85?= =?UTF-8?q?=E7=90=86=E7=BC=93=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Waste.Application/ThirdApiInfo/OpenService.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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];