I cannot figure this out, I read somewhere that the Cache should be in a user context (not only application wide) but I cannot find out how to use that mode... Because of technological issues with AJAX I want to use the Cache instead of Session for example
using:
Cache["UsersID"] = ...
and obviously it has to be specific for each user session?
The Cache object lives inside the current AppDomain (ie. ASP.NET Application Scope) and it stores its entries in a Hashtable. When you store a reference object like a DataSet you are actually storing a live reference of that object,
which means if you make a change to that object it’s reflected in all other clients that are trying to read that object or currently hold a reference.
Dabbi2000
Member
36 Points
41 Posts
asp.net Cache and user context
May 09, 2007 02:11 PM|LINK
I cannot figure this out, I read somewhere that the Cache should be in a user context (not only application wide) but I cannot find out how to use that mode... Because of technological issues with AJAX I want to use the Cache instead of Session for example using:
Cache["UsersID"] = ...
and obviously it has to be specific for each user session?
Cache user context
Rex Lin - MSFT
All-Star
17422 Points
2116 Posts
Re: asp.net Cache and user context
May 15, 2007 01:37 AM|LINK
HI,Dabbi2000 :
The Cache object lives inside the current AppDomain (ie. ASP.NET Application Scope) and it stores its entries in a Hashtable. When you store a reference object like a DataSet you are actually storing a live reference of that object, which means if you make a change to that object it’s reflected in all other clients that are trying to read that object or currently hold a reference.
More Details here:
http://west-wind.com/weblog/posts/1214.aspx
I hope the above information will be helpful. If you have any issues or concerns, please let me know. It's my pleasure to be of assistance
__________________________________________________
Sincerely,
Rex Lin
Microsoft Online Community Support
If there is any question or the issue is not resolved, please feel free to mark the thread as not resolved