allBlogsList

Output Cache Settings

In one of my recent articles Sitecore HTML Cache and How it works in MVC solutions?, we have discussed how output caches work in Sitecore MVC solutions. This article outlines the different options using which we can define output cache settings.

Rendering Definition Item

Every rendering item created in Sitecore provides us an option to define output cache settings as shown below.

Rendering_Defintion_Item_Caching_Options

Control Properties dialog in Layout details

We also have an option to define output cache settings when you bind a presentation component to a placeholder in layout details as shown below

Control_Properties_Caching_Options

What's the difference as both seem to look the same?

  • When you define cache settings in rendering definition item, it is applied by default to every page where this rendering is being used instead of explicitly defining the cache settings again in the control properties dialog.
  • When you bind a presentation component to a placeholder using layout details, cache settings explicitly defined in layout details will override cache settings defined in the rendering definition item.
  • Cache settings defined in the rendering definition items apply only when no cache settings exist in the Caching section in the Control Properties dialog.