From 687ed48ddc763e5674eb34b7f4e4227c30e2d384 Mon Sep 17 00:00:00 2001
From: xiazhengtongxue <133085197+xiazhengtongxue@users.noreply.github.com>
Date: 星期六, 18 四月 2026 15:11:48 +0800
Subject: [PATCH] Merge branch 'dev' of http://115.159.85.185:8098/r/SuZhouGuanHong/ShanMeiXinNengYuan into dev
---
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/HostedService/ApiRouteCacheWarmupHostedService.cs | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/HostedService/ApiRouteCacheWarmupHostedService.cs b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/HostedService/ApiRouteCacheWarmupHostedService.cs
index b5a0a1c..7c82c8c 100644
--- a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/HostedService/ApiRouteCacheWarmupHostedService.cs
+++ b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/HostedService/ApiRouteCacheWarmupHostedService.cs
@@ -46,8 +46,16 @@
public Task StartAsync(CancellationToken cancellationToken)
{
+ const string cacheKey = $"{RedisPrefix.Code}";
+
+ _cache.RemoveByPrefix($"{cacheKey}");
+
+
+
const string cacheKeyPrefix = $"{RedisPrefix.Code}:{RedisName.API}:";
int warmedCount = 0;
+
+
foreach ((string configKey, string routePath) in ApiRouteMappings)
{
@@ -55,7 +63,7 @@
warmedCount++;
}
- _logger.LogInformation("API璺敱缂撳瓨棰勭儹瀹屾垚銆傛暟閲�={Count}", warmedCount);
+ _logger.LogInformation("API璺敱缂撳瓨棰勭儹瀹屾垚锛屽叡鍔犺浇={Count}涓矾鐢辨槧灏�", warmedCount);
return Task.CompletedTask;
}
--
Gitblit v1.9.3