/// <summary> /// 得到权限实体,从缓存中。 /// </summary> public string GetLimitByCache(int ID) { string CacheKey = CacheName.App_LimitModel(ID); object objModel = DataCache.GetCache(CacheKey); if (objModel == null) { try { objModel = dal.GetLimit(ID); if (objModel != null) { int ModelCache = CacheTime.LimitExpir; DataCache.SetCache(CacheKey, objModel, DateTime.Now.AddMinutes(ModelCache), TimeSpan.Zero); } } catch { } } return(objModel.ToString()); }