@@ -39,10 +39,10 @@ public class MenuServices : IMenuServices
3939private readonly UserManager < User > _userManager ;
4040private readonly RoleManager < Role > _roleManager ;
4141private readonly Microsoft . Extensions . Logging . ILogger _logger = null ;
42- private readonly ICache _cache = null ;
42+ // private readonly ICache _cache = null;
4343
4444private readonly AsyncLock _mutex = new AsyncLock ( ) ;
45- public MenuServices ( IMenuRepository menuRepository , IUnitOfWork unitOfWork , IRepository < RoleMenuEntity , Guid > roleMenuRepository , IMenuFunctionRepository menuFunction , IPrincipal principal , UserManager < User > userManager , RoleManager < Role > roleManager , IRepository < UserRole , Guid > repositoryUserRole , Microsoft . Extensions . Logging . ILoggerFactory loggerFactory , ICache cache )
45+ public MenuServices ( IMenuRepository menuRepository , IUnitOfWork unitOfWork , IRepository < RoleMenuEntity , Guid > roleMenuRepository , IMenuFunctionRepository menuFunction , IPrincipal principal , UserManager < User > userManager , RoleManager < Role > roleManager , IRepository < UserRole , Guid > repositoryUserRole , Microsoft . Extensions . Logging . ILoggerFactory loggerFactory /* , ICache cache*/ )
4646{
4747_menuRepository = menuRepository ;
4848_roleMenuRepository = roleMenuRepository ;
@@ -53,7 +53,7 @@ public MenuServices(IMenuRepository menuRepository, IUnitOfWork unitOfWork, IRep
5353_roleManager = roleManager ;
5454_repositoryUserRole = repositoryUserRole ;
5555_logger = loggerFactory . CreateLogger < MenuServices > ( ) ;
56- _cache = cache ;
56+ // _cache = cache;
5757}
5858
5959public async Task < OperationResponse > CreateAsync ( MenuInputDto input )
@@ -287,9 +287,9 @@ public async Task<OperationResponse> GetVueDynamicRouterTreeAsync()
287287
288288var key = $ "{ routerKey } { userId } ";
289289
290- var treeList = await _cache . GetAsync < IReadOnlyList < VueDynamicRouterTreeOutDto > > ( key ) ; //得到缓存
291- if ( treeList == null )
292- {
290+ // var treeList = await _cache.GetAsync<IReadOnlyList<VueDynamicRouterTreeOutDto>>(key); //得到缓存
291+ // if (treeList == null)
292+ // {
293293
294294int isAdmin = _iIdentity . FindFirst < int > ( DestinyCoreFlowClaimTypes . IsAdmin ) ;
295295var roleids = _repositoryUserRole . Entities . Where ( x=> x . UserId == userId ) . Select ( x=> x . RoleId ) ;
@@ -324,14 +324,14 @@ public async Task<OperationResponse> GetVueDynamicRouterTreeAsync()
324324
325325TimeSpan ts2 = sw . Elapsed ;
326326_logger . LogInformation ( $ "得到动态路由所有多少{ ts2 . TotalMilliseconds } 毫秒") ;
327- await _cache . SetAsync ( key , result . ItemList ) ;
327+ // await _cache.SetAsync(key, result.ItemList);
328328return OperationResponse . Ok ( MessageDefinitionType . LoadSucces , result . ItemList ) ;
329- }
330- else
331- {
329+ // }
330+ // else
331+ // {
332332
333- return OperationResponse . Ok ( MessageDefinitionType . LoadSucces , treeList ) ;
334- }
333+ // return OperationResponse.Ok(MessageDefinitionType.LoadSucces, treeList);
334+ // }
335335}
336336
337337