Commit 4cf3956 1 parent cd8f115 commit 4cf3956 Copy full SHA for 4cf3956
File tree 1 file changed +3
-3
lines changed
Ape.Volo.Business/Permission
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -263,14 +263,14 @@ public async Task<List<ExportBase>> DownloadAsync(MenuQueryCriteria menuQueryCri
263
263
264
264
public async Task < List < MenuDto > > QueryAllAsync ( )
265
265
{
266
- var menuDtos = await ApeContext . Cache . GetAsync < List < MenuDto > > ( "menus: LoadAllMenu" ) ;
267
- if ( menuDtos . Any ( ) )
266
+ var menuDtos = await ApeContext . Cache . GetAsync < List < MenuDto > > ( GlobalConstants . CachePrefix . LoadAllMenu ) ;
267
+ if ( menuDtos != null && menuDtos . Count != 0 )
268
268
{
269
269
return menuDtos ;
270
270
}
271
271
272
272
menuDtos = ApeContext . Mapper . Map < List < MenuDto > > ( await Table . ToListAsync ( ) ) ;
273
- if ( menuDtos . Any ( ) )
273
+ if ( menuDtos . Count != 0 )
274
274
{
275
275
await ApeContext . Cache . SetAsync ( GlobalConstants . CachePrefix . LoadAllMenu , menuDtos ,
276
276
TimeSpan . FromSeconds ( 120 ) , null ) ;
You can’t perform that action at this time.
0 commit comments