Skip to main content


Showing posts from October, 2019

Changing Glass Caching key

There are a few ORM's for Siteocre and Glass is a great one. Like any framework though it has somethings that don't work they way you may need it to. For glass one of these may be how it generates a cache key. This article is focused on version 5 of glass. Here is the code Glass uses for generating a cache key for all items it caches.You can see it uses a lot of the fields on a Sitecore item to generate the cache key. It does this to make sure it is caching a unique model. However, this is the cache key you are stuck with as there are no settings that will change this. Don't worry though, there is way to plug into Glass and tell it to use a different one. public class CacheKeyGenerator : ICacheKeyGenerator { public string Generate (ObjectConstructionArgs args) { SitecoreTypeCreationContext typeCreationContext = args.AbstractTypeCreationContext as SitecoreTypeCreationContext; return string .Format( "{0}{1}{2}{3}{4}{5}{6}{7}" ,

Multiple Sitecore EXM Root Managers and missing templates

One of the flexibility points of Sitecore EXM is its manager root . You can create as many of these as you want and each one controls the settings for how emails from that manager root will be treated. These are pretty easy to create and Sitecore Hacker has a nice run down on his Email Manager in Details post . There is something left out here though and left out in the Sitecore documentation as well. In theory you can create your root managers where every you want in the content tree. At least there is nothing that will stop you. However, if you don't create them in the right place you will see some odd behavior. If you try and create a template for a given manager root in EXM and see no templates this is the odd behavior I speak of. The image to the left shows this. This issue is caused by one area of the EXM root manager configuration requiring that it has one and only one location to look for email managers. So even though you can create lots of these, they all ave to be