Jo Current.Cache["User"] blir ju samma för alla, som jag ser det.
För att istället få det användarunikt kan man ju:
public User GetUser(string userName)
{
if (HttpContext.Current.Cache[userName] != null)
{
return (User)HttpContext.Current.Cache[userName]; // cache nyckeln blir unik per user
}
else
{
UserDao dao = new UserDao();
User User = dao.GetUser(userName);
HttpContext.Current.Cache.Add(userName, User, null, DateTime.Now.AddMinutes(10), Cache.NoSlidingExpiration,
System.Web.Caching.CacheItemPriority.NotRemovable, null); // Lagra i cache i x antal minuter
return User;
}
}