public RedirectResult Logout()
        {
            HttpContext.GetOwinContext().Authentication.SignOut();

            string getLoginFlag = string.Empty;
            var    getCookie    = Request.Cookies["user_login"];

            getLoginFlag = getCookie == null ? "Y" :
                           EncryptString.desDecryptBase64(Server.UrlDecode(getCookie.Value)); //Value:N

            Session.Remove("IsAuthorized");                                                   //ckfinder用
            removeCookie("user_id");
            removeCookie("user_name");
            removeCookie("user_login");
            SiteMaps.ReleaseSiteMap();

            if (getLoginFlag == "Y")
            {
                return(Redirect("~"));
            }
            else
            {
                return(Redirect("~/_SysAdm?t=" + DateTime.Now.Ticks));
            }
        }
        public ActionResult Main()
        {
            HttpContext.GetOwinContext().Authentication.SignOut();
            ViewData["username"] = "";
            ViewData["password"] = "";

#if DEBUG
            ViewData["username"] = CommWebSetup.AutoLoginUser;
            ViewData["password"] = CommWebSetup.AutoLoginPassword;
#endif
            removeCookie("user_id");
            removeCookie("user_name");
            removeCookie("user_login");
            SiteMaps.ReleaseSiteMap();

            ViewBag.BodyClass = "Login";
            ViewBag.Year      = DateTime.Now.Year;

            return(View("index"));
        }
        public int ClearOuputCache(string controller, string action)
        {
            if (string.IsNullOrEmpty(controller))
            {
                if (!string.IsNullOrEmpty(action))
                {
                    throw new ArgumentNullException(controller, "Controller must be provided when action not empty");
                }

                //Relase site map cache on clear all output cache for all stores
                foreach (var store in _storeClient.GetStores())
                {
                    //Need to set storeId for session because SiteMapStoreCacheKeyGenerator uses it to generate cache key
                    _sessionService.CustomerSession.StoreId = store.StoreId;
                    SiteMaps.ReleaseSiteMap();
                }
            }


            return(_outputCacheManager.RemoveItems(controller, action));
        }
 /// <summary>
 /// Called by the MVC framework after the action method executes.
 /// </summary>
 /// <param name="filterContext">The filter context.</param>
 public override void OnActionExecuted(ActionExecutedContext filterContext)
 {
     SiteMaps.ReleaseSiteMap(this.SiteMapCacheKey);
 }