BroadleafCommerce/BroadleafCommerce — pull request #761 by bpolster (2014-03-06 20:37:31+00:00)
Title: Add mechanism to cache Thymeleaf templates 

Similar to the standard Thymeleaf substituteBy processor. This feature adds the ability to cache page fragments to avoid costly processing.

The example below caches the header template using a cacheKey based on the customer.

```html

```

> Note, in the Broadleaf Demo application, this would not be 100% correct as the cart quantity also shows in the header.

The cacheKey can be any valid Thymeleaf expression. Also note that the cacheKey can be further resolved programmatically with a custom implementation of `ITemplateCacheKeyResolver`. The default implementation just returns the cacheKey as it was passed in.