<ehcache updateCheck="false" name="shiroCache">
<defaultCache
<!--最大缓存数量 -->
maxElementsInMemory="10000"
eternal="true"
timeToIdleSeconds="120"
timeToLiveSeconds="120"
overflowToDisk="true"
diskPersistent="false"
diskExpiryThreadIntervalSeconds="120"
clearOnFlush="false"
/>
</ehcache>

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:内存数量最大时是否清除。

【nosql】之ehcache.xml文件属性描述的更多相关文章

  1. 二级缓存处理大数据 用ehcache.xml配置文件

    二级缓存大量数据的解决方案 数据很大 二级缓存 存储大数据,让 内存和磁盘文件进行交互,数据库中的不变的数据在磁盘上,这样就可以少和数据库进行交互了 ehcache.xml 放在src下 <eh ...

  2. Ehcache(02)——ehcache.xml简介

    http://haohaoxuexi.iteye.com/blog/2113728 ehcache.xml简介 ehcache.xml文件是用来定义Ehcache的配置信息的,更准确的来说它是定义Ca ...

  3. ehcache.xml 属性大全

    属性大全 name:缓存名称. maxElementsInMemory:缓存最大个数. eternal:对象是否永久有效,一但设置了,timeout将不起作用. timeToIdleSeconds:设 ...

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

     项目结构(所需jar包,配置文件) sqlMapConfig.xml的配置内容如下: <?xmlversion="1.0"encoding="UTF-8&qu ...

  5. 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包如下 ...

  6. Ehcache入门经典:第二篇ehcache.xml的参数

    继续第一篇 diskStorepath:指定在硬盘上存储对象的路径path属性可以配置的目录有: user.home(用户的家目录) user.dir(用户当前的工作目录) java.io.tmpdi ...

  7. ehcache加载配置文件ehcache.xml的源码

    package net.sf.ehcache.config; public final class ConfigurationFactory { public static Configuration ...

  8. 2.ehcache.xml简介

    转自:https://www.cnblogs.com/crazylqy/p/4238148.html ehcache.xml文件是用来定义Ehcache的配置信息的,更准确的来说它是定义CacheMa ...

  9. jeecms v9导入myeclipse 2015 ehcache.xml报错问题

    1.找不到ehcache.xml文件问题 cache-context.xml <property name="configLocation"> <value> ...

随机推荐

  1. TJU Problem 2101 Bullseye

    注意代码中: result1 << " to " << result2 << ", PLAYER 1 WINS."<& ...

  2. FileNotFoundError: [Errno 2] No such file or directory的解决方法

    1.获取当前文件所在路径 basedir = os.path.dirname(__file__) print("basedir:" + basedir) 2.将路径进行拼接 upl ...

  3. 螺旋图 comet3 (comet) 不同轴的圆周运动图

    matlab 绘图 螺旋图小实例  动态显示comet3函数(comet显示平面) t=[:]; x=*t*sin(pi/).*cos(*t); y=*t*sin(pi/).*sin(*t); z=* ...

  4. Xlua使用教程、攻略

    Xlua 使用指南 本文提供全流程,中文翻译. Chinar 坚持将简单的生活方式,带给世人!(拥有更好的阅读体验 -- 高分辨率用户请根据需求调整网页缩放比例) Chinar -- 心分享.心创新! ...

  5. 陕西师范第七届K题----动态规划

    ps: 自己的方法绝对是弱爆了 肯定存在更优的方法 O(n^3)复杂度 暴力求解的.. 链接:https://www.nowcoder.com/acm/contest/121/K来源:牛客网 柯怡最近 ...

  6. spawn函数的实现(前文自动执行器的翻版)

    function spawn(genF) { return new Promise(function(resolve, reject) { const gen = genF(); function s ...

  7. C# 8.0、.NET Framework 4.8与NET Standard 2.1的一个说明

    C# 8.0..NET Framework 4.8与NET Standard 2.1的一个说明 https://blog.csdn.net/sD7O95O/article/details/846098 ...

  8. spring IOC简单分析

    Spring IOC 体系结构 BeanFactory(BeanFactory 里只对 IOC 容器的基本行为作了定义,根本不关心你的 bean 是如何定义怎样加载的.正如我们只关心工厂里得到什么的产 ...

  9. mvc core2.1 Identity.EntityFramework Core 注册 (二)

    Startup.cs-> Configure app.UseAuthentication(); //启动验证 Controllers->AccountController.cs 新建 us ...

  10. Linux常用命令详解-目录文件操作命令

    来源:https://www.linuxidc.com/Linux/2018-04/151801.htm 现实中,服务器(包含Linux,Unix,Windows Server)一般都摆放在机房里,因 ...