Reputation: 6631
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!
Upvotes: 0
Views: 680
Reputation: 767
May be it worth to add issue a cookie for each user. If you will stop the application the session may be lost
Upvotes: 0
Reputation: 28824
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.
Upvotes: 1