Data cache vs session object in ASP.Net

前端 未结 5 1188
眼角桃花
眼角桃花 2021-01-02 03:53

Should dynamic business objects for a site be stored in the users session or use ASP.Net caching (objects such as orders, profile information etc)?

I have worked wi

5条回答
  •  被撕碎了的回忆
    2021-01-02 04:23

    If the objects are shareable between user sessions, then use the cache. If the objects are unique to each session -- perhaps because they are governed by permissions -- then store it in the session. The in-process session itself is stored in the cache so the deciding factor really should be the scope of the data.

提交回复
热议问题