Should I set IsReusable to True in my HttpHandlers?

后端 未结 3 1985
故里飘歌
故里飘歌 2021-02-13 13:00

I\'ve never fully understood this property of the IHttpHandler. It is a property that you have to set when you implement the interface. I\'ve assumed that setting it to true w

3条回答
  •  青春惊慌失措
    2021-02-13 13:56

    IsReusable keeps the handler in memory and able to handle multiple requests. When set to false, it has to create a new instance of the handler for each incoming request.

    I had some issues with this property myself:

    Streaming Databased Images Using HttpHandler

提交回复
热议问题