Output caching for an ApiController (MVC4 Web API)

后端 未结 5 1318
我在风中等你
我在风中等你 2020-12-04 23:41

I\'m trying to cache the output of an ApiController method in Web API.

Here\'s the controller code:

public class TestController : ApiController
{
            


        
5条回答
  •  天涯浪人
    2020-12-05 00:05

    WebAPI does not have any built in support for the [OutputCache] attribute. Take a look at this article to see how you could implement this feature yourself.

提交回复
热议问题