ehcache.xml 配置文件备忘录(不建议出现中文注释,此处备忘)

<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../config/ehcache.xsd" updateCheck="false">

<diskStore path="java.io.tmpdir"/>
<!--
Mandatory Default Cache configuration. These settings will be applied to caches
created programmtically using CacheManager.add(String cacheName)
-->
<!--
name: 缓存名称。
maxElementsInMemory:缓存最大个数。
eternal: 对象是否永久有效,一但设置了,timeout 将不起作用。
timeToIdleSeconds:设置对象在失效前的允许闲置时间(单位:秒)。仅当 eternal=false 对象不是永久有效时使用,可选属性,默认值是 0,也就是可闲置时间无穷大。
timeToLiveSeconds:设置对象在失效前允许存活时间(单位:秒)。最大时间介于创建时间和失效时间之间。仅当 eternal=false 对象不是永久有效时使用,默认是 0.,也就是对象存活时间无穷大。
overflowToDisk:当内存中对象数量达到 maxElementsInMemory 时,Ehcache 将会对象写到磁盘中。
diskSpoolBufferSizeMB:这个参数设置 DiskStore(磁盘缓存)的缓存区大小。默认是 30MB。每个 Cache 都应该有自己的一个缓冲区。
maxElementsOnDisk:硬盘最大缓存个数。
diskPersistent:是否缓存虚拟机重启期数据 Whether the disk store persists between restarts of the Virtual Machine. The default value is false.
diskExpiryThreadIntervalSeconds:磁盘失效线程运行时间间隔,默认是 120 秒。
memoryStoreEvictionPolicy:当达到 maxElementsInMemory 限制时,Ehcache 将会根据指定的策略去清理内存。默认策略是 LRU(最近最少使用)。你可以设置为 FIFO(先进先出)或是 LFU(较少使用)。
clearOnFlush:内存数量最大时是否清除。
-->
<defaultCache
maxElementsInMemory="10000"
eternal="false"
timeToIdleSeconds="120"
timeToLiveSeconds="120"
overflowToDisk="true"
maxElementsOnDisk="10000000"
diskPersistent="false"
diskExpiryThreadIntervalSeconds="120"
memoryStoreEvictionPolicy="LRU"
/>
</ehcache>

原文地址:https://www.cnblogs.com/bg7c/p/8118602.html

时间: 2024-08-30 09:27:22

ehcache.xml 配置文件备忘录(不建议出现中文注释,此处备忘)的相关文章

01_MyBatis EHCache集成及所需jar包,ehcache.xml配置文件参数配置及mapper中的参数配置

 1 与mybatis集成时需要的jar ehcache-core-2.6.5.jar mybatis-ehcache-1.0.2.jar Mybatis.日志.EHCache所需要的jar包如下: 2 EHCache与mybatis集成 EHCache是一种广泛使用java分布式缓存通用缓存,JavaEE中的一个轻量级的容器. EHCache集成是基于ehcache-core,没有任何其它第三方应用程序. 想使用EHCache到她们的应用程序的用户,必须下载EHCache的zip bund

Tmocat的service.xml配置文件详解(含中文翻译)

Tmocat的service.xml配置文件 英文原版 中文手译 <?xml version='1.0' encoding='utf-8'?> <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.  See the NOTICE file distributed with this work for additional informa

[转载]tomcat的配置文件server.xml不支持中文注释的解决办法

原文链接:http://tjmljw.iteye.com/blog/1500370 启动tomcat失败,控制台一闪而过,打开catalina的log发现错误指向了conf/server.xml,报错信息如下: -------------------------- 05-Dec-2016 20:17:01.903 WARNING [main] org.apache.catalina.startup.Catalina.load Catalina.start using conf/server.xm

tomcat的配置文件server.xml不支持中文注释的解决办法(转载)

早上启动tomcat失败,控制台一闪而过,打开catalina的log发现错误指向了conf/server.xml,报错信息如下: -------------------------- 警告: Catalina.start using conf/server.xml: com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException: 2 字节的 UTF-8 序列的字节 2 无效. ... ... --------

02_MyBatis项目结构,所需jar包,ehcache.xml配置,log4j.properties,sqlMapConfig.xml配置,SqlMapGenerator.xml配置

 项目结构(所需jar包,配置文件) sqlMapConfig.xml的配置内容如下: <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN" "http://mybatis.org/dtd/mybatis-3-config.dtd"> &l

Spring框架[一]——spring概念和ioc入门(ioc操作xml配置文件)

Spring概念 spring是开源的轻量级框架(即不需要依赖其他东西,可用直接使用) spring核心主要两部分 aop:面向切面编程,扩展功能不是修改源代码来实现: ioc:控制反转,比如:有一个类,在类中有个方法(非静态的方法),要调用类中的这个方法,则需要创建类的对象,使用对象调用方法.创建类对象的过程,需要new出来对象:而ioc则是将对象的创建不是通过new方式实现,而是交给spring配置来创建对象(即,将对象的创建交给spring来管理): spring是一站式框架 spring

spring applicationContext.xml 配置文件 详解

applicationContext.xml 文件 <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:context="http://www.springframework.org/schema/context" xmlns:xsi="http

ehcache.xml简介

这是从网上找的一片关于ehcache.xml的简介 ehcache.xml简介 ehcache.xml文件是用来定义Ehcache的配置信息的,更准确的来说它是定义CacheManager的配置信息的.根据之前我们在<Ehcache简介>一文中对CacheManager的介绍我们知道一切Ehcache的应用都是从CacheManager开始的.在不指定配置信息参数创建CacheManager时,CacheManager将首先在类路径的根目录下寻找一个叫ehcache.xml的文件作为Cache

(转)Unity 导出XML配置文件,动态加载场景

参考:http://www.xuanyusong.com/archives/1919 http://www.omuying.com/article/48.aspx 主要功能: 1.导出场景的配置文件 2.导出当前场景中资源的AssetBundle 3.客户端从服务器获取配置文件 4.解析配置文件,并根据配置文件下载AssetBundle 5.实例化并还原场景 1.场景设置:将需要导出的场景资源设置为预设 2.将场景配置导出为XML文件 [code]csharpcode: using UnityE