spring 配置ehcache,我搞了一天没配成功,缓存一直不起作用
来个用过的朋友帮帮我吧

解决方案 »

  1.   

    spring的缓存?  不是hibernate的缓存么?
      

  2.   

    这是hibernate的缓存的配置ehcache.xml文件
    <ehcache>
        
        
        <defaultCache
         maxElementsInMemory="10000"
         eternal="false"
         overflowToDisk="true"
         timeToIdleSeconds="0"
         timeToLiveSeconds="0"
         diskPersistent="false"
         diskExpiryThreadIntervalSeconds="120"/>
        
    <!-- changpinerji cache-->
        <cache name="com.csair.shop.pojo.Commodity"
         maxElementsInMemory="500"
         eternal="true"
         timeToIdleSeconds="300"
         timeToLiveSeconds="600"
         overflowToDisk="false"/>
        
        
        
    </ehcache>