Rationale Behind IReadOnlySessionState

前端 未结 2 1550
傲寒
傲寒 2021-01-13 18:59

I just implemented a handler that uses IReadOnlySessionState and was wondering why this marker interface is needed. (I understand that it is needed in order to access Sessi

2条回答
  •  误落风尘
    2021-01-13 19:34

    Yes, AFAIK, you are correct. Both IReadOnlySessionState and IRequiresSessionState are marker interfaces that protect you from making your handler heavier, and slower.

    The difference between them is only the write status of the session.

提交回复
热议问题