private List <DropdownItem> CreateFilterObject(FilterType type) { if (CacheHelper.GetFromCacheWithCheck <List <DropdownItem> >(type.ToString()) != null) { return(CacheHelper.GetFromCacheWithCheck <List <DropdownItem> >(type.ToString())); } Strategy2020ContentBuilder contentBuilder = new Strategy2020ContentBuilder(); List <Strategy2020DTO> list = new List <Strategy2020DTO>(); if (CacheHelper.GetFromCacheWithCheck <List <Strategy2020DTO> >("filterbaselist") != null && CacheHelper.GetFromCacheWithCheck <List <Strategy2020DTO> >("filterbaselist").Count > 0) { list = CacheHelper.GetFromCacheWithCheck <List <Strategy2020DTO> >("filterbaselist"); } else { list = contentBuilder.BuildStrategy2020List(); CacheHelper.AddToCacheForOneMinute(this.cache, "filterbaselist", list); } List <DropdownItem> dds = new List <DropdownItem>(); switch (type) { case FilterType.Type: dds = filterData.GetValidTypeFilter(list); break; case FilterType.Agenda: dds = filterData.GetValidAgendaFilter(list); break; case FilterType.Policy: dds = filterData.GetValidPolicyFilter(list); break; case FilterType.Rule: dds = filterData.GetValidRuleFilter(list); break; case FilterType.Process: dds = filterData.GetValidProcessFilter(list); break; case FilterType.SubProcess: dds = filterData.GetValidSubProcessFilter(list); break; case FilterType.Application: dds = filterData.GetValidApplicationFilter(list); break; case FilterType.Module: dds = filterData.GetValidModuleFilter(list); break; default: break; } CacheHelper.AddToCacheWithCheck(type.ToString(), dds); return(dds); //this.view.ShowContent(html); }