Browse Source

这个地方有问题,有时候取不到ICache,改用App.GetService获取

Signed-off-by: DanielXu <xujun032@163.com>
DanielXu 2 years ago
parent
commit
ac6c276865
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Admin.NET/Admin.NET.Core/EventBus/RedisQueue.cs

+ 1 - 1
Admin.NET/Admin.NET.Core/EventBus/RedisQueue.cs

@@ -16,7 +16,7 @@ namespace Admin.NET.Core;
 /// </summary>
 public static class RedisQueue
 {
-    private static readonly ICache _cache = Cache.Default;
+      private static ICache _cache = App.GetService<ICache>();
 
     /// <summary>
     /// 获取可信队列,需要确认