ehcache.xml详解
2015-09-28 16:44
288 查看
<?xml version="1.0" encoding="UTF-8"?> <ehcache> <!-- Sets the path to the directory where cache .data files are created. 设置缓存文件被创建的目录路径 If the path is a Java System Property it is replaced by its value in the running VM. 如果这个路径是Java System Property,那么这个路径就会被这个属性值所替代 The following properties are translated: user.home - User's home directory user.dir - User's current working directory java.io.tmpdir - Default temp file path --> <!--Default Cache configuration. These will applied to caches programmatically created through the CacheManager. The following attributes are required: maxElementsInMemory - Sets the maximum number of objects that will be created in memory 设置内存中创建的最大对象个数 eternal - Sets whether elements are eternal. If eternal, timeouts are ignored and the element is never expired. 设置元素是否永恒,如果永恒,那么将忽略超时限制并且该元素永远不会过期 overflowToDisk - Sets whether elements can overflow to disk when the in-memory cache has reached the maxInMemory limit. 设置在内存中的缓存达到打到最大的对象数时是否允许溢出到磁盘 The following attributes are optional: timeToIdleSeconds - Sets the time to idle for an element before it expires. 设置元素过期之前的空闲时间 i.e. The maximum amount of time between accesses before an element expires Is only used if the element is not eternal. Optional attribute. A value of 0 means that an Element can idle for infinity.The default value is 0. timeToLiveSeconds - Sets the time to live for an element before it expires. 设置元素过期之前的时间 i.e. The maximum time between creation time and when an element expires. Is only used if the element is not eternal. Optional attribute. A value of 0 means that and Element can live for infinity. The default value is 0. diskPersistent - Whether the disk store persists between restarts of the Virtual Machine. 在重启虚拟机后磁盘存储是否还存在 The default value is false. diskExpiryThreadIntervalSeconds - The number of seconds between runs of the disk expiry thread. 磁盘失效线程之间的运行秒数。 The default value is 120 seconds. --> <diskStore path="/data/ehcache"/> <defaultCache maxElementsInMemory="10000" eternal="false" overflowToDisk="true" timeToIdleSeconds="120" timeToLiveSeconds="180" diskPersistent="false" diskExpiryThreadIntervalSeconds="60" /> <cache name="org.hibernate.cache.StandardQueryCache" maxElementsInMemory="10000" eternal="false" timeToIdleSeconds="300" timeToLiveSeconds="4200" overflowToDisk="true" /> <cache name="org.hibernate.cache.UpdateTimestampsCache" maxElementsInMemory="5000" eternal="true" timeToIdleSeconds="0" timeToLiveSeconds="0" overflowToDisk="false" /> </ehcache>
相关文章推荐
- vs2010 cannot file the PDB file解决
- 百度前端笔试题整体(2013年及之前的)
- 【转载】Android事件分发机制完全解析,带你从源码的角度彻底理解(下)
- 01.0 SpringMVC4 的开发环境搭建
- 视图控制器 的生命周期
- APP测试包括什么内容啊,什么时候开始 ?
- Java动态代理的实现机制
- spark-sql
- Sencha Cmd
- hdu5481 Desiderium
- curl 命令总结
- dom4j读写xml文件
- iOS开发脚踏实地学习day17-彩票
- Spring整合CXF步骤,Spring实现webService,spring整合WebService
- mysql性能优化
- hdu5481 Desiderium
- ReactJs之表单处理
- D3D空间变换和矩阵作用
- C++技术点积累(9)——补充
- mysql可以远程连接,但是不能本地连接