Setting HTTP cache control headers in Web API

后端 未结 4 631
执念已碎
执念已碎 2020-12-13 17:17

What\'s the best way to set cache control headers for public caching servers in WebAPI?

I\'m not interested in OutputCache control on my server, I\'m looking to co

4条回答
  •  失恋的感觉
    2020-12-13 17:57

    Like this answer suggesting filters, consider the "extended" version -- http://www.strathweb.com/2012/05/output-caching-in-asp-net-web-api/

    It used to be available as a NuGet package Strathweb.CacheOutput.WebApi2, but doesn't seem to be hosted anymore, and is instead on GitHub -- https://github.com/filipw/AspNetWebApi-OutputCache

提交回复
热议问题