浏览代码

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

Signed-off-by: DanielXu <xujun032@163.com>
DanielXu 2 年之前
父节点
当前提交
ac6c276865
共有 1 个文件被更改,包括 1 次插入1 次删除
  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>
     /// 获取可信队列,需要确认