Example #1
0
 /// <summary>
 /// 手动刷新缓存
 /// </summary>
 public static void InitCache()
 {
     try
     {
         Hashtable where = new Hashtable();
         where.Add(RolesArgs.state, (int)CommonState.normal);
         where.Add(RolesArgs.OrderBy, "rid asc");
         List <RolesModel> list = RolesBLL.GetRolesList(where);
         if (list != null)
         {
             HttpContext.Current.Cache.Insert(KEY, list);
         }
     }
     catch (Exception ex)
     {
         FGA_NUtility.SysLog.WriteException("缓存异常 " + KEY, ex);
     }
 }