소스 검색

😎修复缓存错误

zuohuaijun 2 년 전
부모
커밋
d9b7f6ab04
1개의 변경된 파일과 1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      Admin.NET/Admin.NET.Core/Service/Cache/SysCacheService.cs

+ 1 - 1
Admin.NET/Admin.NET.Core/Service/Cache/SysCacheService.cs

@@ -14,7 +14,7 @@ namespace Admin.NET.Core.Service;
 [ApiDescriptionSettings(Order = 400)]
 [ApiDescriptionSettings(Order = 400)]
 public class SysCacheService : IDynamicApiController, ISingleton
 public class SysCacheService : IDynamicApiController, ISingleton
 {
 {
-    private static ICacheProvider _cacheProvider = App.GetService<ICacheProvider>();
+    private static ICacheProvider _cacheProvider;
     private readonly CacheOptions _cacheOptions;
     private readonly CacheOptions _cacheOptions;
 
 
     public SysCacheService(ICacheProvider cacheProvider, IOptions<CacheOptions> cacheOptions)
     public SysCacheService(ICacheProvider cacheProvider, IOptions<CacheOptions> cacheOptions)