, , cookie Http Cache (HttpContext.Current.Cache).
, "UserCache". HttpModule ( ...) , , , http. , , HttpContext.Current.Cache. .
, , , .
public class UserCache
{
public IUser GetUser(object userKey)
{
return HttpContext.Current.Cache[userKey];
}
public void AddUser(object userKey, IUser user)
{
HttpContext.Current.Cache.Add();
}
public void ExpireUser(object userKey)
{
HttpContext.Current.Cache.Remove(userKey);
}
public void UpdateUser(object userKey, IUser user)
{
HttpContext.Current.Cache.Insert();
}
}
( , DI, ), , . , SQL-, .
. .
HttpModule, , - EndRequest, , , cookie, , , . , MSDN WAY 1,1 , , .
SO , , , (http://highscalability.com/stack-overflow-architecture).