Hello Spring users,

I've been experimenting a bit with just released Spring 3.1.0.M1 and new caching API and came up with following Spring context config:

Code:
<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns:p="http://www.springframework.org/schema/p"
	xmlns:cache="http://www.springframework.org/schema/cache"
	xsi:schemaLocation="http://www.springframework.org/schema/beans
		http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
		http://www.springframework.org/schema/cache
		http://www.springframework.org/schema/cache/spring-cache-3.1.xsd">

	<bean id="ehCacheCacheManager" class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean"
			p:configLocation="classpath:ehcache.xml"
			p:shared="false"
		/>
		
	<bean id="cacheManager" class="org.springframework.cache.ehcache.EhCacheCacheManager"
		p:cacheManager-ref="ehCacheCacheManager"/>
	
	<cache:annotation-driven cache-manager="cacheManager" proxy-target-class="false" mode="proxy"/>
	
</beans>
Please let me know if I'm not using some API appropriately.

Not sure if it's just me, but using legacy EhCacheManagerFactoryBean and then EhCacheCacheManager feels wrong, step too much. Will EhCacheManagerFactoryBean be refactored to create org.springframework.cache.CacheManager, or some new similar factory bean will be added to the API followed by extension of cache namespace?

Couldn't find the ticket in JIRA for 3.1.0.M1 which brought new caching support.

Regards,
Stevo.