Tuesday, January 13, 2009

Gotcha: cache settings on a rendering, sublayout or web control

A very minor change was made in version 6 as for the caching settings on the presentation controls, easy to get caught. The data template section that hosts the caching checkboxes is considered as "Standard Field" section so it is not visible unless the Standard Fields are enabled.

So if you are trying to adjust global caching settings for a rendering, sublayout or web control you will need to locate it in the appropriate branch underneath /sitecore/layout and don't forget to toggle "Standard Fields" to have the "Caching" section with the chekboxes show up:

In addition to Sitecore debugger where you can identify whether your renderings are actually retrieved from cache, there is a very convenient tool to check the cache settings is /sitecore/admin/stats.aspx
It filters by website, counts the instances of the renderings, shows you the number of cached instances, etc.

Update: it is actually considered as a bug and will be addressed in upcoming major update.