Significance of bool IsReusable in http handler interface

后端 未结 3 1598
[愿得一人]
[愿得一人] 2021-01-30 02:15

When writing a http handler/module, there is an interface member to implement called - bool IsReusable.

What is the significance of this member? If I set it to false (or

3条回答
  •  無奈伤痛
    2021-01-30 02:30

    If you don't store any state in that instance (i.e.: you don't have any fields (aka "class variables")) then you should be safe reusing it.

    It's by default false to be on the safe side.

提交回复
热议问题