• New Feature
  • Status: Closed
  • 2 Major
  • Resolution: Fixed
  • hsingh
  • Reporter: steve
  • May 31, 2010
  • 0
  • Watchers: 0
  • January 17, 2013
  • September 03, 2010

Description

Caches created from the default cache doesn’t seem to add the decorator

Comments

Steve Harris 2010-05-31

Is this hard to fix?

Abhishek Singh 2010-05-31

Adding mail thread:

Yeah, I can see where that would be a problem. We would need some sort of pattern or magic naming convention to make it work

On May 30, 2010, at 10:03 PM, Abhishek Sanoujam wrote:

This is intended and cacheDecoratorFactory is not supported for “defaultCache” deliberately. The reason why this is not supported is that the “cacheDecoratorFactory”, for non stop cache and others, will at least need a ‘name’ parameter for the new decorated cache and this name needs to be unique (as the decorated caches are added to the cache manager). This is a problem if we allow a cacheDecoratorFactory at the defaultCache level, as all the ‘cache’ defined in the config will share the same name for the decorated cache. User’s will have to specifically specify each of the cacheDecoratorFactory, with the properties for each factory. For nonstopcache, the ‘name’ of the decorated cache is mandatory.

Abhishek Singh 2010-06-02

At the least, we can support expanding the cache name which the decorator is decorating. Something like:

As the cacheName will be unique, the expanded name for the decorated cache will also be unique automatically.

Abhishek Singh 2010-06-04

Assigning back. Need to decide what approach to take. Another approach is also we can make assumptions that whatever name is in the defaultCache “name” property, it will be appended to the name of the cache.

Fiona OShea 2010-06-08

Need some design meetings

Fiona OShea 2010-08-11

Is this already done? Steve thinks it is

Abhishek Singh 2010-09-03

Fixed.

Himadri Singh 2010-10-19

With config mentioned in the jira, following line is logged if nonStopCache is working.

 2010-10-19 20:44:22,171 INFO main [net.sf.ehcache.constructs.nonstop.NonStopCacheConfigImpl] - No value was specified for key 'immediateTimeout'. Using default value - 'true'

Verified in ehcache-core 2.3.0 & tim-ehcache-2.x-1.6.1. Doesnt work for ehcache-core 2.2.0 & tim-ehcache-2.x-1.6.0