Пример #1
0
        public IEnumerable <Module> LoadSearch(long userId, Expression <Func <Module, bool> > predicate, int count = 0)
        {
            IEnumerable <Module> toRet;

            if (!CacheHelper.Get(Module + "_" + Evaluator.PartialEval(predicate), out toRet))
            {
                toRet = _repository.LoadSearch(predicate, count);
                CacheHelper.Add(Module + "_" + Evaluator.PartialEval(predicate), toRet, BlCommon.DefaultTimeOut());
            }
            return(toRet);
        }