缓存代码备用
public List<WhoLearning> GetWhoLearningTop50() { string CacheKey = "GetWhoLearningTop50"; object objModel = Maticsoft.Common.DataCache.GetCache(CacheKey); if (objModel == null) { objModel = dal.GetWhoLearningTop50(); if (objModel != null) { //int ModelCache = Maticsoft.Common.ConfigHelper.GetConfigInt("ModelCache"); Maticsoft.Common.DataCache.SetCache(CacheKey, objModel, DateTime.Now.AddSeconds(10), TimeSpan.Zero); } } return (List<WhoLearning>)objModel; }