示例#1
0
 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);
 }
示例#2
0
 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);
 }