What is the use for IHttpHandler.IsReusable?

后端 未结 3 652
野趣味
野趣味 2020-12-08 03:51

I\'m writing a IHttpHandler and I\'ll need to implement a IsReusable property. When I look at the MSDN documentation it says:

3条回答
  •  情深已故
    2020-12-08 04:15

    Apparently, this 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.

    Here's a question that shows what happens when it's not used properly:

    Streaming Databased Images Using HttpHandler

提交回复
热议问题