日期:2014-05-16  浏览次数:20433 次

hibernate3.2二级缓存的配置及测试(ehcache)
做删除操作时系统报错:Cache is not alive.
然后找到了这篇文章:研究了下,好了

1.配置ehcache.xml文件,放到classpath下:



<?xml version="1.0" encoding="GBK"?>
      <ehcache>       
             <diskStore path="D://TempObject"/>             
             <defaultCache                      
                       maxElementsInMemory="10000"                     
                       eternal="false"                       
                       timeToIdleSeconds="100"                 
                       timeToLiveSeconds="1000"             
                      overflowToDisk="true"           
              />          
             <cache name="com.sitechasia.occ.core.base.ExampleForTest"                                                                                    maxElementsInMemory="10000"                      
                      eternal="false"                      
                      timeToIdleSeconds="100"                     
                      timeToLiveSeconds="1000"                      
                    &nb