Currently, there's a choice between Spring's EhCacheManagerFactoryBean (which is not a great fit for @Bean methods) and the native EhCache CacheManager bootstrapping options (which are a good match for Java-style setup but lack Spring-driven resource setup etc). Some convenience methods to close that gap would be nice.
I've introduced an EhCacheManagerUtils class with several buildCacheManager methods, accepting Resource handles and/or a cache manager name. For advanced purposes, there's also a parseConfiguration(Resource) method which allows for further tweaking of the EhCache Configuration before building the CacheManager.
While being at it, and towards our 4.1 theme, I've also revised EhCacheCacheManager's setup logic to call EhCacheManagerUtils.buildCacheManager() now if not given a specific CacheManager, analogous to what JCacheCacheManager does already.
Juergen Hoeller opened SPR-12093 and commented
Currently, there's a choice between Spring's
EhCacheManagerFactoryBean
(which is not a great fit for@Bean
methods) and the native EhCacheCacheManager
bootstrapping options (which are a good match for Java-style setup but lack Spring-driven resource setup etc). Some convenience methods to close that gap would be nice.Affects: 4.1 RC2
Referenced from: commits 0d0d713
The text was updated successfully, but these errors were encountered: