• New Feature
  • Status: Closed
  • 1 Critical
  • Resolution: Fixed
  • ehcache-core
  • hsingh
  • Reporter: amiller
  • December 09, 2009
  • 0
  • Watchers: 0
  • January 17, 2013
  • January 20, 2010

Description

A new CacheManager level property should be added that says whether dynamic configuration is allowed on the caches (default = true). When dynamic config is not allowed, changing the configuration should throw an error.

This is needed to allow administrators and ops to turn off dynamic config changes in production.

This property should also determine whether cache enable/disable is allowed!

Comments

Chris Dennis 2009-12-18

This is implemented in my private dev branch, I’ll close this when its been through code review and I’ve merged the changes back into trunk.

Chris Dennis 2010-01-20

Dynamic configuration of ehcache instances can now be disabled at the cache manager level by setting the dynamicConfig attribute to false. Caches instances can also have dynamic configuration disabled programatically, by calling cache.disableDynamicFeatures()

Himadri Singh 2010-02-22

Verified in rev 1888

Dynamic config can be disabled

  1. programmatically

     Configuration ehcacheConfig = new Configuration();
     ehcacheConfig.setDefaultCacheConfiguration(createDefaultCacheConfiguration());
     ehcacheConfig.setName("CacheManager");
     ehcacheConfig.setDynamicConfig(false);
     cacheManager = new CacheManager(ehcacheConfig);
    
  2. ehcache.xml

3. per cache cache.disableDynamicFeatures(); </div>