分类: Web开发
2013-11-19 16:59:48
如果在/sandh/web-inf/classes下面没有ehcache.xml这个文件,会报这个错误,No configuration found.
Configuring ehcache from ehcache-failsafe.xml found in the classpath:.....这个文件是hibernate缓存配置文
件
eternal="false"
timeToIdleSeconds="10000"
timeToLiveSeconds="10000"
overflowToDisk="true"
/>
eternal="false"
timeToIdleSeconds="10000"
timeToLiveSeconds="10000"
overflowToDisk="true"
/>
上面配置了默认类缓存和城市类缓存策略:
”表示把数据写到这个目录下。Java.io.tmpdir目录在运行时会根据相对路径生成。
name表示具体的缓存命名。
maxElementsInMemory表示cache中最大允许保存的对象数据量。
eternal表示cache中数据是否为常量。
timeToIdleSeconds表示缓存数据钝化时间
timeToLiveSeconds表示缓存数据的生命时间。
overflowToDisk表示内存不足时,是否启用磁盘缓存。