Umbraco and Donut Output Cache

Donut Output Caching is a type of output caching where certain parts of a web page are not cached. It’s a simple way of boosting your site performance!

ASP.NET doesn’t provide a native way of donut output caching, so we must resort to a great NuGet package called MVCDonutCaching. You can read all about it here: http://www.devtrends.co.uk/blog/donut-output-caching-in-asp.net-mvc-3.

Since Umbraco is built on top of ASP.NET MVC, we can easily use this package on our websites. There are, however, some caveats, because Umbraco doesn’t use the native MVC routing.

For Umbraco, every page that uses the same document type is processed through the same route, therefore, if we have 100 news articles that use the NewsItem document type, from the moment we open one news article page, every other news item page will display the same information, despite having a different URL!

Continue reading

Umbraco profiler

Quick tip:

If you need to find which part of your Umbraco application is slowing the site down, follow these steps:

  1. Set the debug property of the compilation section of your Web.config to true<compilation defaultLanguage=”c#” debug=”true” batch=”false” targetFramework=”4.5″>
    • If you’re using an older version of Umbraco, you also probably need to set the umbracoDebugMode app setting to true in the same config file: <add key=”umbracoDebugMode” value=”true” />
  2. Add the query string ?umbdebug=true to your Umbraco page URL
  3. Thats it!
umbraco profiler
umbraco profiler

It uses Mini Profiler, so you can add your own profile stops, but out-of-the-box it already analyses the time it takes to render each view.

Happy profiling!