private IList <MDDepartmentEntity> GetILFromCache() { IList <MDDepartmentEntity> lstDepartment = null; if (HttpContext.Current.Cache[CommonConstants.DEPARTMENT_FC] == null) { String fe = SqlExpressionBuilder.PrepareFilterExpression(MDDepartmentEntity.FLD_NAME_IsRemoved, "false", SQLMatchType.Equal); lstDepartment = DataAccessFactory.CreateMDDepartmentDataAccess().GetIL(null, null, String.Empty, fe, DatabaseOperationType.LoadWithFilterExpression); // storing in the cache if (lstDepartment != null) { HttpContext.Current.Cache[CommonConstants.DEPARTMENT_FC] = lstDepartment; } } else { lstDepartment = (IList <MDDepartmentEntity>)HttpContext.Current.Cache[CommonConstants.DEPARTMENT_FC]; } return(lstDepartment); }