Static Session Class and Multiple Users

后端 未结 3 1924
轮回少年
轮回少年 2020-12-30 13:37

I am building a class to store User ID and User Role in a session. I\'m not sure how this class will behave when multiple users are on the site at the same time. Does anyone

3条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-30 14:08

    You'll get a new session for each connection. No two users will ever share session. Each connection will have its own SessionID value. As long as the user stays on your page (doesn't close the browser, etc.) the user will retain that session from one request to the next.

提交回复
热议问题