BigMemory 4.3.10 | Product Documentation | BigMemory Go Developer Guide | Cache Decorators | Creating a Decorator | Declarative Creation
 
Declarative Creation
You can configure decorators directly in ehcache.xml. The decorators will be created and added to the CacheManager.
It accepts the name of a concrete class that extends net.sf.ehcache.constructs.CacheDecoratorFactory
The properties will be parsed according to the delimiter (default is comma ",") and passed to the concrete factory's createDecoratedEhcache(Ehcache cache, Properties properties) method along with the reference to the owning cache.
It is configured as per the following example:
<cacheDecoratorFactory
class="com.company.SomethingCacheDecoratorFactory"
properties="property1=36 ..." />
Note that decorators can be configured against the defaultCache. This is very useful for frameworks like Hibernate that add caches based on the configuration of the defaultCache.