From 3eddcb9973e487424773d67197b8ba19392b6154 Mon Sep 17 00:00:00 2001 From: Haiping Chen Date: Fri, 23 Aug 2024 14:02:03 -0500 Subject: [PATCH] RunCrawlingTaskById --- .gitignore | 3 ++- .../BotSharp.Core/Infrastructures/CacheService.cs | 9 +++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 4f9359c7..126bcaff 100644 --- a/.gitignore +++ b/.gitignore @@ -293,4 +293,5 @@ logs wwwroot appsettings.Production.json *.csproj.user -env/ \ No newline at end of file +env/ +FodyWeavers.* \ No newline at end of file diff --git a/src/Infrastructure/BotSharp.Core/Infrastructures/CacheService.cs b/src/Infrastructure/BotSharp.Core/Infrastructures/CacheService.cs index 45767fc2..e5670397 100644 --- a/src/Infrastructure/BotSharp.Core/Infrastructures/CacheService.cs +++ b/src/Infrastructure/BotSharp.Core/Infrastructures/CacheService.cs @@ -16,6 +16,9 @@ public class CacheService : ICacheService public async Task GetAsync(string key) { +#if DEBUG + return default; +#endif if (string.IsNullOrEmpty(_settings.Redis)) { return default; @@ -39,6 +42,9 @@ public class CacheService : ICacheService public async Task GetAsync(string key, Type type) { +#if DEBUG + return default; +#endif if (string.IsNullOrEmpty(_settings.Redis)) { return default; @@ -63,6 +69,9 @@ public class CacheService : ICacheService public async Task SetAsync(string key, T value, TimeSpan? expiry) { +#if DEBUG + return; +#endif if (string.IsNullOrEmpty(_settings.Redis)) { return;