public ActionResult ReviewDuplicates(int?countryId, bool enableCache = true, double maxDupeRange = 500, int minConfidence = 70)
        {
            if (countryId == null)
            {
                countryId = 1;                   //default to UK
            }
            ViewBag.MinConfidenceLevel = minConfidence;
            string cacheKey = "DupeList_" + countryId;

            OCM.API.Common.Model.Extended.POIDuplicates duplicateSummary = null;
            if (enableCache && _cache.Get(cacheKey) != null)
            {
                duplicateSummary = (OCM.API.Common.Model.Extended.POIDuplicates)_cache.Get(cacheKey);
            }
            else
            {
                duplicateSummary = new DataAnalysisManager().GetAllPOIDuplicates(new POIManager(), (int)countryId, maxDupeRange);
                _cache.Set(cacheKey, duplicateSummary);
            }

            ViewBag.ShowDataProvider = true;
            return(View(duplicateSummary.DuplicateSummaryList));
        }
Example #2
0
        public ActionResult ReviewDuplicates(int?countryId, bool enableCache = true, double maxDupeRange = 500, int minConfidence = 70)
        {
            if (countryId == null)
            {
                countryId = 1;                   //default to UK
            }
            ViewBag.MinConfidenceLevel = minConfidence;
            string cacheKey = "DupeList_" + countryId;

            OCM.API.Common.Model.Extended.POIDuplicates duplicateSummary = null;
            if (HttpRuntime.Cache[cacheKey] != null && enableCache)
            {
                duplicateSummary = (OCM.API.Common.Model.Extended.POIDuplicates)HttpRuntime.Cache[cacheKey];
            }
            else
            {
                duplicateSummary            = new POIManager().GetAllPOIDuplicates((int)countryId, maxDupeRange);
                HttpRuntime.Cache[cacheKey] = duplicateSummary;
            }

            ViewBag.ShowDataProvider = true;
            return(View(duplicateSummary.DuplicateSummaryList));
        }