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 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.
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.
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
Thats it! Didn't checked that.
Thnx!
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
is working on a reply...