Hi there,
I understand that I can set up spring such that I can use either a ConcurrentMap cache, or ehcache cache by swapping between these two configurations, like:
orCode:<bean id="cacheManager" class="org.springframework.cache.ehcache.EhCacheCacheManager" p:cacheManager-ref="ehcache"/> ... <bean id="ehcache" class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean" p:configLocation="ehcache.xml" p:shared="true"/>
but since the cacheManager is unique, if I want to include both of them in the configuration, I need to specify them in different profiles with names like: "concurrentManager", "ecacheManager", is there a way for me to switch between them at run time?Code:<bean id="cacheManager" class="org.springframework.cache.support.SimpleCacheManager"> <property name="caches"> <set> <bean class="org.springframework.cache.concurrent.ConcurrentMapCacheFactoryBean" p:name="employee"/> </set> </property> </bean>
Thanks,
David


Reply With Quote