ehcache.xml详解
<?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>
ehcache.xml详解的更多相关文章
- Web.xml详解(转)
这篇文章主要是综合网上关于web.xml的一些介绍,希望对大家有所帮助,也欢迎大家一起讨论. ---题记 一. Web.xml详解: (一) web.xml加载过程(步骤) 首 ...
- Maven-pom.xml详解
(看的比较累,可以直接看最后面有针对整个pom.xml的注解) pom的作用 pom作为项目对象模型.通过xml表示maven项目,使用pom.xml来实现.主要描述了项目:包括配置文件:开发者需要遵 ...
- 【maven】 pom.xml详解
pom.xml详解 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www ...
- build.xml详解
build.xml详解1.<project>标签每个构建文件对应一个项目.<project>标签时构建文件的根标签.它可以有多个内在属性,就如代码中所示,其各个属性的含义分别如 ...
- 【转】maven核心,pom.xml详解
感谢如下博主: http://www.cnblogs.com/qq78292959/p/3711501.html maven核心,pom.xml详解 什么是pom? pom作为项目对象模型.通过 ...
- C#中的Linq to Xml详解
这篇文章主要介绍了C#中的Linq to Xml详解,本文给出转换步骤以及大量实例,讲解了生成xml.查询并修改xml.监听xml事件.处理xml流等内容,需要的朋友可以参考下 一.生成Xml 为了能 ...
- Ant 之bulid.xml详解
ANT build.xml文件详解(一) Ant的概念 可能有些读者并不连接什么是Ant以及入可使用它,但只要使用通过Linux系统得读者,应该知道 make这个命令.当编译Linux内核及一些软件的 ...
- Tomcat配置(二):tomcat配置文件server.xml详解和部署简介
*/ .hljs { display: block; overflow-x: auto; padding: 0.5em; color: #333; background: #f8f8f8; } .hl ...
- Tomcat(二):tomcat配置文件server.xml详解和部署简介
Tomcat系列文章:http://www.cnblogs.com/f-ck-need-u/p/7576137.html 1. 入门示例:虚拟主机提供web服务 该示例通过设置虚拟主机来提供web服务 ...
随机推荐
- pyDay7
内容来自廖雪峰的官方网站 1.如果给定一个list或tuple,我们可以通过for循环来遍历这个list或tuple,这种遍历我们称为迭代(Iteration). 2.只要是可迭代对象,无论有无下标, ...
- python构造栈结构
栈:是一种先进后出的数据结构:本片文章,我们用python的面向对象来构造这样的数据结构. 栈中的每一个数据除了存储当前的数值外,还存储着当前数值下一个数据的类型(注意不是下一个数据的数值). cla ...
- ELK学习笔记之CentOS 7下ELK(6.2.4)++LogStash+Filebeat+Log4j日志集成环境搭建
0x00 简介 现在的公司由于绝大部分项目都采用分布式架构,很早就采用ELK了,只不过最近因为额外的工作需要,仔细的研究了分布式系统中,怎么样的日志规范和架构才是合理和能够有效提高问题排查效率的. 经 ...
- python函数—形参、实参、位置参数、关键字参数
1.通过def function_name([parameter]): 定义,函数一遇到return即结束运行.如果函数没有定义返回值,则返回None,如果定义了一个返回值,则返回该对象,如果一个re ...
- C++面向对象高级开发课程(第一周)
0. 内存分区 计算机中的内存在用于编程时,被人为的进行了分区(Segment),分为: -“栈区”(Stack) -“堆区”(Heap) -全局区(静态 区,Static) -文字常量区和程序代码区 ...
- jenkins 安装 + maven + git部署
1. 安装JDK 2. 安装maven 3. 安装git 4. 安装tomcat tar zxvf apache-tomcat-8.5.14.tar.gz 找到tomcat-->config-- ...
- 常用模块之hashlib,subprocess,logging,re,collections
hashlib 什么是hashlib 什么叫hash:hash是一种算法(3.x里代替了md5模块和sha模块,主要提供 SHA1, SHA224, SHA256, SHA384, SHA512 ,M ...
- P4113 [HEOI2012]采花 (莫队TLE)
思路 update 11.2 树状数组AC 本题莫队过不去,会TLE ----------------------- 但也是个不错的莫队练手题 ------------------------ 毕竟C ...
- shell:遍历目录和子目录的所有文件及匹配文件内容到日志
过滤文件内网 #!/bin/bash function getdir(){ ` do dir_or_file=$"/"$element if [ -d $dir_or_file ] ...
- 【Maven】2.使用Nexus3搭建Maven私服+上传第三方jar包到本地maven仓库
参考文章: http://www.cnblogs.com/luotaoyeah/p/3791966.html --------------------------------------------- ...