asp.net Cache and user context

Last post 05-14-2007 9:37 PM by Rex Lin - MSFT. 1 replies.

Sort Posts:

  • asp.net Cache and user context

    05-09-2007, 10:11 AM
    • Member
      36 point Member
    • Dabbi2000
    • Member since 12-29-2003, 4:53 PM
    • Iceland
    • Posts 41

    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?

    Filed under: ,
  • Re: asp.net Cache and user context

    05-14-2007, 9:37 PM
    Answer

    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

    Best Regards,
    __________________________________________________
    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
Page 1 of 1 (2 items)