栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 面试经验 > 面试问答

ehcache持续存在磁盘问题

面试问答 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

ehcache持续存在磁盘问题

好的,我要做的就是使用配置文件配置缓存。这是更新的配置:

<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"          xsi:nonamespaceSchemaLocation="../config/ehcache.xsd">    <diskStore path="C:/mycache" />    <defaultCache        maxElementsInMemory="10000"         eternal="true"        timeToIdleSeconds="120"         timeToLiveSeconds="120"         overflowToDisk="true"        maxElementsonDisk="10000000"         diskPersistent="true"        diskExpiryThreadIntervalSeconds="120"         memoryStoreEvictionPolicy="LRU" />    <cache         name="test"         maxElementsInMemory="500"         eternal="true"        overflowToDisk="true"         timeToIdleSeconds="300"         timeToLiveSeconds="600"        diskPersistent="true"         diskExpiryThreadIntervalSeconds="1"        memoryStoreEvictionPolicy="LFU" /></ehcache>

因此,基本上我没有使用构造函数来定义缓存。

我想这会起作用,但是我仍然想知道为什么以编程方式定义的缓存不能持久化在磁盘上(特别是因为它们仍然被写入磁盘!)。

感谢您的评论。



转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/508220.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号