For a client we have created a custom api that does some retrieving of data from a database. As the content of the database does not change often we want to cache the api method.
In Asp.Net MVC I would use the OutputCache attribute to set the cache. Can I use this attribute in Umbraco as well? The api controller implements the UmbracoApiController as a base class.
This wouldn't work. If I understand the article correctly this is client side caching ,while I am looking to cache server side to limit database calls.
Asp.Net OutputCache in Umbraco ApiController
For a client we have created a custom api that does some retrieving of data from a database. As the content of the database does not change often we want to cache the api method.
In Asp.Net MVC I would use the OutputCache attribute to set the cache. Can I use this attribute in Umbraco as well? The api controller implements the UmbracoApiController as a base class.
If you're API is a RESTful API, you may want to use HTTP ETags for caching.
An ETag in HTTP with '304 Not Modified' could work well.
Check out more info on ETags here:
https://developers.google.com/web/fundamentals/performance/optimizing-content-efficiency/http-caching?hl=en
This wouldn't work. If I understand the article correctly this is client side caching ,while I am looking to cache server side to limit database calls.
is working on a reply...