<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns:cache="http://www.springframework.org/schema/cache"
	xsi:schemaLocation="
		http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
		http://www.springframework.org/schema/cache http://www.springframework.org/schema/cache/spring-cache.xsd">


	<!--
	<aop:config>
		<aop:advisor advice-ref="debugInterceptor" pointcut="execution(* *..CacheableService.*(..))" order="1"/>
	</aop:config>

	<bean id="cacheAspect" class="org.springframework.cache.aspectj.AnnotationCacheAspect" factory-method="aspectOf">
		<property name="cacheManager" ref="cacheManager"/>
		<property name="cacheOperationSources" ref="annotationSource"/>
	</bean>

	<bean id="annotationSource" class="org.springframework.cache.annotation.AnnotationCacheOperationSource"/>
	-->

	<cache:annotation-driven mode="aspectj" key-generator="keyGenerator"/>

	<bean id="keyGenerator" class="org.springframework.cache.config.SomeKeyGenerator" />

	<bean id="cacheManager" class="org.springframework.cache.support.SimpleCacheManager">
		<property name="caches">
			<set>
				<bean class="org.springframework.cache.concurrent.ConcurrentMapCacheFactoryBean">
					<property name="name" value="testCache"/>
				</bean>
				<bean class="org.springframework.cache.concurrent.ConcurrentMapCacheFactoryBean">
					<property name="name" value="primary"/>
				</bean>
				<bean class="org.springframework.cache.concurrent.ConcurrentMapCacheFactoryBean">
					<property name="name" value="secondary"/>
				</bean>
			</set>
		</property>
	</bean>

	<bean id="customKeyGenerator" class="org.springframework.cache.config.SomeCustomKeyGenerator" />

	<bean id="customCacheManager" class="org.springframework.cache.support.SimpleCacheManager">
		<property name="caches">
			<set>
				<bean class="org.springframework.cache.concurrent.ConcurrentMapCacheFactoryBean">
					<property name="name" value="testCache"/>
				</bean>
			</set>
		</property>
	</bean>

	<bean id="debugInterceptor" class="org.springframework.aop.interceptor.DebugInterceptor"/>

	<bean id="service" class="org.springframework.cache.config.DefaultCacheableService"/>
	<bean id="classService" class="org.springframework.cache.config.AnnotatedClassCacheableService"/>

</beans>
