public bool Delete(string key) { if (HttpContext.Current.Request.Cookies.AllKeys.Contains("MemcacheSessionId")) { var cookieValue = cookie.Value; if (MemcacheHelper.Delete(cookieValue + "$" + key)) { return(true); } } return(true); }
public bool DeleteSession(string key) { if (HttpContext.Current.Request.Cookies.AllKeys.Contains("MemcacheSessionId")) { var cookieValue = cookie.Value; //var cookie1 = HttpContext.Current.Request.Cookies["MemcacheSessionId"]; cookie.Expires = DateTime.Now.AddDays(-1); HttpContext.Current.Response.Cookies.Add(cookie); if (MemcacheHelper.Delete(cookieValue + "$" + key)) { return(true); } } return(true); }