ASP.Net Session

前端 未结 13 1342
清酒与你
清酒与你 2020-12-08 07:54

I am wanting to store the \"state\" of some actions the user is performing in a series of different ASP.Net webforms. What are my choices for persisting state, and what are

13条回答
  •  时光取名叫无心
    2020-12-08 08:09

    Anything you put in the session object stays there for the duration of the session unless it is cleaned up. Poor management of memory stored using inproc and stateserver will force you to scale out earlier than necessary. Store only an ID for the session/user in the session and load what is needed into the cache object on demand using a helper class. That way you can fine tune it's lifetime according to how often that data us used. The next version of asp.net may have a distributed cache(rumor).

提交回复
热议问题