Output Caching in ASP.NET Web API 2

Β· 198 words Β· 1 minutes to read

A while ago I released a little library for Web API caching - called CacheOutput.

With the release of Web API 2, some things change (obviously the Web API core gets a bump to 5.0) so the library required a new release. I have decided to take a page out of the book of my friends over at Autofac, and do not release over the old Nuget package, but instead release a new one specifically for Web API 2.

If you are in need of caching for Web API 2, you should use the package called Strathweb.CacheOutput.WebApi2

Strathweb.CacheOutput.WebApi2 πŸ”—

It’s available on Nuget since 2 weeks ago, but I forgot to blog about it πŸ™‚

So, for Web API 2 (.NET 4.5) use:

Install-Package Strathweb.CacheOutput.WebApi2  

For Web API 1 (.NET 4.0), you can still use the old one:

Install-Package Strathweb.CacheOutput  

Main reason to do it like that is to avoid the hassle of binding redirects and all that. Also, a lot of people still use Web API 1 so I think it’s clean like this - I really like this approacch in i.e. Autofac.

All the documentation over at Github is still valid, and both versions are hosted there.

About


Hi! I'm Filip W., a cloud architect from ZΓΌrich πŸ‡¨πŸ‡­. I like Toronto Maple Leafs πŸ‡¨πŸ‡¦, Rancid and quantum computing. Oh, and I love the Lowlands 🏴󠁧󠁒󠁳󠁣󠁴󠁿.

You can find me on Github and on Mastodon.

My Introduction to Quantum Computing with Q# and QDK book
Microsoft MVP