Copied to clipboard

Flag this post as spam?

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


  • Wesley de Roo 38 posts 142 karma points
    Sep 26, 2013 @ 16:14
    Wesley de Roo
    0

    Implementing Donut Caching and MVC part in existing solution

    Thnx for contributing this package.

    I was trying to implemt the the MVC part with DonutCaching in a existing solution. I only implemented the BaseModel and the defaultcontroller for now. The caching works, only problem i have is when, for example, i call the url domain.com/news/newsitemB I get the same content when I previously called the url domain.com/news/newsitemA. It caches exact the same content when the page has the same view.

    I'm using Umbraco 6.1.5. 

    Templating tree:
    Master
    - Homepage
    - Submaster
    -- Newsitem
    -- Newsitems

    When I start your solution and looked at the news section, that problem does not occure.

    Do you know what is going wrong? Or can you give me a direction to search for.

  • Jeroen Breuer 4861 posts 12134 karma points MVP 3x admin c-trib
    Sep 26, 2013 @ 16:22
    Jeroen Breuer
    101

    Hello,

    Have a look at the Global class in Umbraco.Extensions/Utilities/Global.cs. This makes sure that DonutCache works per url.

    In your DonutOutputCache attribute set VaryByCustom = "url".

    In Umbraco.Site/Global.asax update Inherits to your own Global class. For example Inherits="Umbraco.Extensions.Utilities.Global".

    Than it should work :-).

    Jeroen

  • Wesley de Roo 38 posts 142 karma points
    Sep 26, 2013 @ 16:32
    Wesley de Roo
    0

    Thats it! Didn't checked that.

    Thnx!

     

  • Matt Taylor 849 posts 2032 karma points
    Jan 24, 2014 @ 15:39
    Matt Taylor
    2

    I had this problem too so I tested it in the original source I'd downloaded from github.

    I found the individual news items were only displaying the first cached version so it would be a good idea to change the Umbraco.Site/Global.asax to Inherits="Umbraco.Extensions.Utilities.Global" there too.

    Cheers,

    Matt

Please Sign in or register to post replies

Write your reply to:

Draft