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