private void SetCacheByDbList(IPagerInputModel pagerInputModel, IPagedList <TEntity> pagedList) { if (IsCacheActive() && pagedList.Count > 0) { CacheManager.Set <IPagedList <TEntity> >(CreateCacheKey(pagerInputModel.ParamString()), pagedList, CacheSettings.CacheTime); } }
private IPagedList <TEntity> GetListByCache(IPagerInputModel pagerInputModel) { IPagedList <TEntity> pagedList = null; if (IsCacheActive()) { string cacheKey = CreateCacheKey(pagerInputModel.ParamString()); pagedList = CacheManager.Get <IPagedList <TEntity> >(cacheKey); } return(pagedList); }