spring web应用 ehcahe配置应该放在appContext.xml还是 servlet.xml?

  1. 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中则应用中的定时任务中缓存无效.
求助

appContext.xml、 servlet.xml两个文件都导入

  <import resource="spring-cache.xml"/>