• Bug
  • Status: Closed
  • 1 Critical
  • Resolution: Fixed
  • ehcache-core
  • cdennis
  • Reporter: cdennis
  • March 11, 2010
  • 0
  • Watchers: 0
  • April 07, 2010
  • March 17, 2010

Description

Hibernate recommend that providers/factories of clustered cache should return true for isMinimalPutsEnabledByDefault. This optimizes for minimal write operations at the expense of additional reads. This is very useful in clustered caches where write operations are significantly more expensive than read operations. Currently we rely on the Ehcache users to enable this in their hibernate configuration manually (hibernate.cache.use_minimal_puts=true). Since this setting is factory/provider scoped (and hence also CacheManager scoped) we will need to either make some decision on whether to enable or not depending on whether clustered caches are configured (and cope with some behavior change when the provider is mixing both clustered and unclustered caches) or we should just switch to true being the default for both clustered and unclustered caches.

Comments

Chris Dennis 2010-03-11

Linking this to the previous issue regarding the same behavior in old versions of tim-ehcache.

Chris Dennis 2010-03-17

I chose to move the default for all caches to true. Attempting to make a decision based on the cache configuration seemed like it would be confusing and also did not fit with the lifecycle that Hibernate uses for caching providers (isMinimalPutsEnabledByDefault() is called prior to start() - when the configuration is parsed).