Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Dave de Moel 122 posts 574 karma points c-trib
    Oct 28, 2015 @ 15:38
    Dave de Moel
    0

    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.

  • Mark 91 posts -18 karma points
    Oct 28, 2015 @ 16:46
    Mark
    0

    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

  • Dave de Moel 122 posts 574 karma points c-trib
    Oct 29, 2015 @ 07:33
    Dave de Moel
    0

    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.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies