`

详解ehcache.xml文件中cache配置参数

阅读更多

<defaultCache
             maxElementsInMemory="10000"
            //缓存中最大允许创建的对象数
             eternal="false"
            //缓存中对象是否为永久的,如果是,超时设置将被忽略,对象从不过期
             timeToIdleSeconds="120"
            //缓存数据钝化时间(设置对象在它过期之前的空闲时间)
             timeToLiveSeconds="120"
             //缓存数据的生存时间(设置对象在它过期之前的生存时间)
             overflowToDisk="true"
             //内存不足时,是否启用磁盘缓存
  />
 
<diskStore>表示当内存缓存中对象数量超过类设置内存缓存数量时,将缓存对象写到硬盘,path=”java.io.tmpdir”表示把数据写到这个目录下。Java.io.tmpdir目录在运行时会根据相对路径生成。
<defaultCache>表示设定缓存的默认数据过期策略。
<cache>表示设定用具体的命名缓存的数据过期策略。
name表示具体的缓存命名。
maxElementsInMemory表示cache中最大允许保存的对象数据量。
eternal表示cache中数据是否为常量。
timeToIdleSeconds表示缓存数据钝化时间
timeToLiveSeconds表示缓存数据的生命时间。
overflowToDisk表示内存不足时,是否启用磁盘缓存。

 

分享到:
评论
3 楼 yingzhor 2011-01-11  
change_wh 写道
change_wh 写道
很好哦啊。。


很好哦啊。。
2 楼 change_wh 2010-06-12  
change_wh 写道
很好哦啊。。

1 楼 change_wh 2010-06-12  
很好哦啊。。

相关推荐

    ehcache.xsd_ehcache.xml代码提示.rar

    软件介绍: 已测试有效的ehcache.xsd文件,引入ide中,进行ehcache.xml的代码提示。Windows外壳公用DLL文件,大小23.1KB。

    ehcache.xml 文件

    ehcache.xml 文件

    ehcache的配置参数详解

    hibernate ehcache.xml 配置详解

    ehcache.xml

    ehcache.xml

    shiro-ehcache.xml

    在maven项目中,此shiro-ehcache.xml配置文件放在resources下,在applicationContext.xml中,用于shiro缓存管理器所配置,然后给shiro安全管理器配置此缓存管理器

    ehcache.xsd文件

    用于引入ide中,进行ehcache.xml的代码提示。本人已亲测有效。

    mybatis ehcache 1.0 ehcache.xsd 提示文件

    mybatis 第三方二级缓存,ehcache 配置文件的 约束文件 ehcache.xsd !!

    ehcahe页面缓存详细内容

    1.需要将附件中2个jar放入lib中 2.将ehcache.xml放入能加载到classpath中的任意包中,不能放入...4.启动工程 如果工程不报错,并且启动日志包含大量|net.sf.ehcache.Cache:net.sf.ehcache.Cache 类似日志说明配置成功

    借助Ehcache缓存框架实现对页面的缓存Demo

    1、ehcache.xml和ehcache.xsd两个文件可以在下在下载下来的名为“ehcache-core-x.x.x-distribution.tar.gz”压缩文件中找到 2、由于要实现Ehcache缓存页面,所以必须要添加“ehcache-web-2.0.4.jar” jar包,该jar包...

    ehcache-core-2.6.5.jar和mybatis-ehcache-1.0.2.jar

    ehcache.xml配置内容 &lt;ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.ehcache.org/ehcache.xsd"&gt; &lt;diskStore path="java.io.tmpdir"/&gt; eternal=...

    ehcache.xsd

    在springboot上配置ehcache时用到的xld文件,在编写xml时会报找不到ehcache.xsd文件,把这个文件放到resources目录底下即可

    java web项目里ehcache.xml介绍

    java web项目里ehcache.xml介绍,需要的朋友可以参考一下

    ehcache-2.10.5.zip

    ehcache.xml 和 ehcache.xsd 版本是 ...在ehcache.xml 与 ehcache.xsd 放在同一目录下 配置如下 &lt;ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ehcache.xsd"&gt;

    springmodules-cache.xsd&springmodules-ehcache.xsd.rar

    解决web.xml中 &lt;page-encoding&gt;UTF-8报错。错误提示: cvc-complex-type.2.4.a: Invalid content was found starting with element 'page-encoding'. One of '{"http:// java.sun....

    springboot 整合ehcache+redis 通过配置文件切换缓存类型

    ehcache :添加依赖 pom.xml 2、添加配置文件ehcache.xml 3、添加注解@EnableCaching @Cacheable 4、插入缓存 5 读取缓存 6 设置缓存过期时间ehcache.xml --&gt;timeToLiveSeconds。 redis : 1、添加依赖 pom.xml 2、...

    Java缓存框架 Ehcache.zip

    EhCache 是一个纯Java的进程内缓存框架,具有快速、精干等特点,是Hibernate中默认的CacheProvider。 下图是 Ehcache 在应用程序中的位置: 主要的特性有: 1. 快速.2. 简单.3. 多种缓存策略4. 缓存数据有两级:...

    ehcache.jar

    ehcache.jar 用于缓存机制的加入。ehcache.jar 用于缓存机制的加入。

    ehcache 的 xsd 文件

    ehcache 的 xsd 文件

    ehcache-failsafe.xml

    ehcache的缓存配置文件

Global site tag (gtag.js) - Google Analytics