Monday, October 5, 2015

Donut caching and Sitecore

Donut caching (and it's opposite Donut Hole caching) in terms of Sitecore can most easily be thought of as thinking of your Sitecore component as a donut sitting on a table representing your page. Where the donut is solid, that is content being cached. Where there is no donut, that is the equivalent of no-cache. This gives you the ability to cache only specific pieces of content on a page outside of doing this at a higher level component level.

Where this gets interesting is when you think of this in terms of nested placeholders.

GlassMapper V4 comes with a new method to deal with caching at a field level by injecting a constructor to the object construction pipeline when you implement and register Glass.Mapper.Caching.ICacheManager to the GlassMapper IOC container.