Ehcache配置参数简介
来源:互联网 发布:t26e4超级潘兴数据图 编辑:程序博客网 时间:2024/04/29 15:43
< defaultCache
maxElementsInMemory = "10000"
maxElementsOnDisk = "0"
eternal = "true"
overflowToDisk = "true"
diskPersistent = "false"
timeToIdleSeconds = "0"
timeToLiveSeconds = "0"
diskSpoolBufferSizeMB = "50"
diskExpiryThreadIntervalSeconds = "120"
memoryStoreEvictionPolicy = "LFU"
/>
< cache name = "myCache"
maxElementsInMemory = "100"
maxElementsOnDisk = "0"
eternal = "false"
overflowToDisk = "false"
diskPersistent = "false"
timeToIdleSeconds = "120"
timeToLiveSeconds = "120"
diskSpoolBufferSizeMB = "50"
diskExpiryThreadIntervalSeconds = "120"
memoryStoreEvictionPolicy = "FIFO"
/>
diskStore :指定数据存储位置,可指定磁盘中的文件夹位置
defaultCache : 默认的管理策略
maxElementsOnDisk: 在磁盘上缓存的element的最大数目,默认值为0,表示不限制。
eternal: 设定缓存的elements是否永远不过期。如果为true,则缓存的数据始终有效,如果为false那么还要根据timeToIdleSeconds,timeToLiveSeconds判断。
overflowToDisk: 如果内存中数据超过内存限制,是否要缓存到磁盘上。
timeToIdleSeconds: 对象空闲时间,指对象在多长时间没有被访问就会失效。只对eternal为false的有效。默认值0,表示一直可以访问。
timeToLiveSeconds: 对象存活时间,指对象从创建到失效所需要的时间。只对eternal为false的有效。默认值0,表示一直可以访问。
diskPersistent: 是否在磁盘上持久化。指重启jvm后,数据是否有效。默认为false。
diskExpiryThreadIntervalSeconds: 对象检测线程运行时间间隔。标识对象状态的线程多长时间运行一次。
diskSpoolBufferSizeMB: DiskStore使用的磁盘大小,默认值30MB。每个cache使用各自的DiskStore。
memoryStoreEvictionPolicy: 如果内存中数据超过内存限制,向磁盘缓存时的策略。默认值LRU,可选FIFO、LFU。
FIFO ,first in first out (先进先出).
LFU , Less Frequently Used (最少使用).意思是一直以来最少被使用的。缓存的元素有一个hit 属性,hit 值最小的将会被清出缓存。
LRU ,Least Recently Used(最近最少使用). (ehcache 默认值).缓存的元素有一个时间戳,当缓存容量满了,而又需要腾出地方来缓存新的元素的时候,那么现有缓存元素中时间戳离当前时间最远的元素将被清出缓存
- Ehcache配置参数简介
- Ehcache配置参数简介
- Ehcache配置参数简介
- Ehcache配置参数简介
- Ehcache配置参数简介
- ehcache参数简介
- ehcache简介及配置
- ehcache简介及配置
- EHCache配置参数说明
- ehcache配置参数说明
- ehcache配置参数说明
- ehcache配置参数说明
- ehcache参数配置总结
- Ehcache配置参数详解
- ehcache配置参数详解
- ehcache配置参数说明
- shiro.ehcache.xml配置参数
- Ehcache(02)——ehcache.xml配置简介
- 50个UI设计网站资源
- Spring Security3源码分析(7)-UsernamePasswordAuthenticationFilter分析
- “东莞物流”APP率先进驻4G企业应用中心
- mongoose 操作mongodb数据库的
- 将旧的数据表存放到新的数据表中
- Ehcache配置参数简介
- Spring Security3源码分析(8)-RememberMeAuthenticationFilter分析
- Android Volley 完全解析(三),定制自己的Request
- java 打开本地文件
- Untrusted Patrol 14牡丹江网络赛C
- Linux——IO与文件目录管理 进程 exec函数系列 fork 子进程
- 写出像printf一样可变长参数的函数
- Spring Security3源码分析(9)-SecurityContextHolderAwareRequestFilter分析
- 大家好,这是我的第一篇在csdn博客的博文!