How to cache user's profile info (update when profile changed)?

Store the object as a session object in the session start event.

Up vote 0 down vote favorite share g+ share fb share tw.

I have a UserInfo object that is generated on each page_prerender event. This object is generated from the db and contains general info and permissions info. Since this object is always the same for each user - unless the user updates his profile - I'd like to cache it.

Does anyone know how I would do so per user (as each user of the web app has a different userinfo object) and get the new values into the cache when a profile is updated. Any help is great! Thanks!

C# .net asp.net caching link|improve this question edited Dec 13 '09 at 18:45 asked Dec 13 '09 at 18:39rksprst1,63362545 61% accept rate.

Store the object as a session object in the session start event this. Session"UserInfo" = myUserInfo; Update this object when the user updates there profile.

It seems like there would be some drawbacks down the road with this approach...? – rksprst Dec 13 '09 at 18:57 Also, I don't think the session exists in the prerender event. – rksprst Dec 13 '09 at 19:10 1 The session starts when the user first arrives at the site and is preserved until it times out, or is programatically eneded. The session state is available at the prerender event.

– Paul Creasey Dec 13 '09 at 19:28 Thanks, works great... site is much faster. – rksprst Dec 13 '09 at 19:36.

May be it worth to add issue a cookie for each user. If you will stop the application the session may be lost.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions