- spring-cache.xml
<cache:annotation-driven cache-manager="cacheManager"/>
<bean id="cacheManagerFactory" class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean">
<property name="configLocation" value="classpath:application/ehcache.xml" />
</bean>
<bean id="cacheManager" class="org.springframework.cache.ehcache.EhCacheCacheManager">
<property name="cacheManager" ref="cacheManagerFactory"/>
这个文件放在appContext.xml(web.xml的context-param加载)还是 servlet.xml(web.xml servlet加载)?
appContext.xml中则http请求缓存无效,
servlet.xml中则应用中的定时任务中缓存无效.
求助