Copied to clipboard

Flag this post as spam?

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


  • Dave Woestenborghs 3504 posts 12135 karma points MVP 9x admin c-trib
    Oct 18, 2010 @ 13:52
    Dave Woestenborghs
    0

    Weird macro cache behavior

    I'm preparing a demo and ran into this strange behavior.

    I installed Umbraco with Runway and the runway topnavigation.

    In the top navigation xslt I added some code to see when the navigation is rendered.

    On the navigation macro i set the cache settings to :

    Cache period : 3600

    Cache by page : unchecked

    Cache personalized : checked

    When I call the page I see that the navigation is rendered every request. When a user logs in the macro gets cached. When I uncheck cache personalized I see that once rendered a cached version of the macro is rendered for all pages. The problem is that when a user logs in he can't see the protected pages.

    Why doesn't umbraco cache the macro when I have cache personalized checked and there is no user logged in ?

     

  • Dave Woestenborghs 3504 posts 12135 karma points MVP 9x admin c-trib
    Oct 19, 2010 @ 09:44
    Dave Woestenborghs
    0

    I think this is a bug so I created a codeplex workitem : http://umbraco.codeplex.com/workitem/29207

    Please vote for this

  • Ian Smedley 97 posts 192 karma points
    Oct 19, 2010 @ 09:49
    Ian Smedley
    0

    Umbraco caches the personalisation per logged on member. Rather than caching for an anonymous user it skips the step entirely, I suppose it's not personalised if there is nobody logged in.

    // do not add to cache if there's no member and it should cache by personalization
                        if (!CacheByPersonalization || (CacheByPersonalization && Member.GetCurrentMember() != null))

    Have you tried ticking both cache by page and cache by personalized? 

    I can't imagine that a navigation macro should be so slow that it'll benefit much by caching, the only macro's we ever cache are those which hit the database [such as those which use getMedia()]

     

  • Dave Woestenborghs 3504 posts 12135 karma points MVP 9x admin c-trib
    Oct 19, 2010 @ 12:28
    Dave Woestenborghs
    0

    Ian,

    I have tried all possible options. 

    But I think it the macro should cache if no user is logged in, even if cache personalized is checked. A public user is a user too

  • Robert Godino 40 posts 129 karma points
    Apr 15, 2015 @ 04:54
    Robert Godino
    0

    Hi dave, the link above to codeplex is broken. Can you reconnect it please?

  • Dave Woestenborghs 3504 posts 12135 karma points MVP 9x admin c-trib
    Apr 15, 2015 @ 08:11
    Dave Woestenborghs
    0

    Hi Robert,

    The link above is more than 4 years old. Since then the Umbraco issue tracker has been moved to http://issues.umbraco.org/dashboard

Please Sign in or register to post replies

Write your reply to:

Draft