public IEnumerable <Code> LoadPaging(long userId, Expression <Func <Code, bool> > predicate, int pageSize, int pageNum, out long totCount) { IEnumerable <Code> toRet; if (!CacheHelper.Get(Module + "_" + pageSize + "_" + pageNum + "_" + Evaluator.PartialEval(predicate), out toRet)) { toRet = _repository.LoadPaging(predicate, pageSize, pageNum, out totCount); CacheHelper.Add(Module + "_" + pageSize + "_" + pageNum + "_" + Evaluator.PartialEval(predicate), toRet, BlCommon.DefaultTimeOut()); CacheHelper.Add(Module + "_totCount_" + Evaluator.PartialEval(predicate), totCount, BlCommon.DefaultTimeOut()); } else { CacheHelper.Get(Module + "_totCount_" + Evaluator.PartialEval(predicate), out totCount); } return(toRet); }