开发者

Track and identify users with Memcached

I hav开发者_JAVA技巧e social network website that contains thousands of users. Until now I used the classic way of storing user's details in the session object. Now, I want to upgrade it, so it will work against Memcached, and the key value is the "userId".

My question is: What is or where is the best place to keep the "userId" so I can use it constantly for querying the user's details from Memcached?


Three options as I see it:

  1. Store it in the ViewState[] collection on your pages
  2. Store it in a cookie
  3. Store it in all urls

these can also be combined for added security/robustness.

Best practice imo would be to combine cookie with viewstate.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜