Why would ASP.NET MVC use session state?

前端 未结 4 1023
名媛妹妹
名媛妹妹 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:23

    Recommended by the ASP.NET team to use cache instead of session

    @ray247, could you provide a reference for this? Session and Cache are different by nature and should be used depending on application requirements. For example storing user specific data into the cache could lead to undesired behavior. Of course if you really want to avoid using session you could provide your own implementation of the ITempDataProvider interface.

提交回复
热议问题