private IList <MDDesignationEntity> GetILFromCache() { IList <MDDesignationEntity> lstDesignation; if (HttpContext.Current.Cache[CommonConstants.DESIGNATION_FC] == null) { // collecting form database String fe = SqlExpressionBuilder.PrepareFilterExpression(MDItemEntity.FLD_NAME_IsRemoved, "false", SQLMatchType.Equal); lstDesignation = DataAccessFactory.CreateMDDesignationDataAccess().GetIL(null, null, String.Empty, fe, DatabaseOperationType.LoadWithFilterExpression); // storing in the cache if (lstDesignation != null) { HttpContext.Current.Cache[CommonConstants.DESIGNATION_FC] = lstDesignation; } } else { lstDesignation = (IList <MDDesignationEntity>)HttpContext.Current.Cache[CommonConstants.DESIGNATION_FC]; } return(lstDesignation); }