If you have recently started working with ASP.NET Web API, you may have noticed the lack of support for Caching.
There is currently no estimated timeframe as to when Microsoft will add support for Caching natively to ASP.NET Web API, but fortunately, there are 2 projects which add support for Caching to your existing ASP.NET Web API Projects!
Personally, amongst the 2 solutions, I prefer the ASPNetWebAPI OutputCache solution because it is more intuitive in using attribute based caching similar to how you can use this today in ASP.NET MVC.
There is currently no estimated timeframe as to when Microsoft will add support for Caching natively to ASP.NET Web API, but fortunately, there are 2 projects which add support for Caching to your existing ASP.NET Web API Projects!
- CacheCow: https://github.com/aliostad/CacheCow
- ASPNetWebAPI OutputCache: https://github.com/filipw/AspNetWebApi-OutputCache
Personally, amongst the 2 solutions, I prefer the ASPNetWebAPI OutputCache solution because it is more intuitive in using attribute based caching similar to how you can use this today in ASP.NET MVC.
I prefer CacheCow as it can invalidate etags when there is put/patch/post/delete on the controller. So you won't have outdated data load from cache.
ReplyDelete