且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在 ASP.NET Web API 中使用缓存?

更新时间:2023-02-15 22:36:39

遗憾的是,ASP.NET Web API 中没有内置缓存.

Unfortunately, caching is not built into ASP.NET Web API.

看看这个让你走上正轨:http://www.strathweb.com/2012/05/output-caching-in-asp-net-web-api/

Check this out to get you on track: http://www.strathweb.com/2012/05/output-caching-in-asp-net-web-api/

此处更新资源:https://github.com/filipw/AspNetWebApi-OutputCache

截至 2020 年 2 月 3 日,即使这个答案很旧,它仍然有效.

以上两个 URL 都指向同一个项目,ASP.NET Web API CacheOutput菲利普 W

Both of the URL's above lead to the same project, ASP.NET Web API CacheOutput by Filip W