开发者

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

I have a UserInfo object that is generated on each page_prerender event. This object is generated f开发者_StackOverflow社区rom 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!


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.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜