Why would ASP.NET MVC use session state?

前端 未结 4 1041
名媛妹妹
名媛妹妹 2020-12-13 05:00

Recommended by the ASP.NET team to use cache instead of session, we stopped using session from working with the WebForm model the last few years. So we normally have the se

4条回答
  •  长情又很酷
    2020-12-13 05:27

    Hmm... May be you've read about persisting of the heavy objects or relatively rarely accessed objects - it's definitely better to put them into cache, but for light objects or for data that is required at every request there is no better technique than put them into Session.

    Sessions are not evil if you are using them correctly.

提交回复
热议问题