Beispiel #1
0
        public ActionResult RebuildSearchIndex()
        {
            try
            {
                //-- Refresh our local cache
                AppLookups.RefreshCacheIndex();

                //-- Refresh our remote cache & search index
                //var url = Stgs.RestSvcsUrl + "v0/search/refresh";

                //var requestCookies = HttpContext.Request.Cookies;
                //var authCookies = new HttpCookieCollection();
                //if (requestCookies.AllKeys.Contains("FedAuth")) { authCookies.Add(requestCookies.Get("FedAuth")); }
                //if (requestCookies.AllKeys.Contains("FedAuth1")) { authCookies.Add(requestCookies.Get("FedAuth1")); }

                return(Json(new { Success = true, Msg = "Cache refresh notification sent to server" }));
            }
            catch (Exception ex)
            {
                CfTrace.Error(ex);
                return(Json(new { Success = false, Error = ex.Message }));
            }
        }