Copied to clipboard

Flag this post as spam?

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


  • WestLifeUmbraco 39 posts 70 karma points
    Apr 23, 2013 @ 16:45
    WestLifeUmbraco
    0

    Umbraco Node.GetCurrent() with Nginx

    My umbraco web server is configured to work with Nginx. I have problem getting a value of a property using the code below:

    var currentNode = Node.GetCurrent();

    currentNode.GetProperty("AProperty");

    The value of the AProperty returns a cached incorrect value.

    Any idea?

  • Merijn van Mourik 58 posts 128 karma points
    Aug 22, 2013 @ 13:49
    Merijn van Mourik
    0

    Stumbled upon this link:

    http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_cache_bypass

    Seems you can confibgure bypass of caching under certain conditions. 

    Edit: I'm playing a littlebit with nginx. Seems to me nginx for now is helping offloading the umbraco site for static content. The duo Umbraco/ASP.NET MVC handles caching really well for dynamic content. For your particular problem. If you use a load-balanced configuration, make sure the aspx or the cshtml's are not behind the nginx cache. And just let Umbraco handle it. (Of course use Macro's, Partial View Macro's, or the @Html.CachedPartial)

Please Sign in or register to post replies

Write your reply to:

Draft