ehcache 3 配置文件

ehcache 3 配置文件
很多元素 需要 按顺序配置
这里写图片描述

<?xml version="1.0" encoding="UTF-8"?>

<config xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
    xmlns='http://www.ehcache.org/v3'
    xsi:schemaLocation="http://www.ehcache.org/v3 http://www.ehcache.org/schema/ehcache-core.xsd">

    <persistence directory="ehcacheTestDisk" />
    <thread-pools>
        <thread-pool alias="defaultDiskPool" min-size="1"
            max-size="3" />
        <thread-pool alias="defaultWriteBehindPool" min-size="1"
            max-size="3" />
        <thread-pool alias="cache2Pool" min-size="2" max-size="2" />
    </thread-pools>

    <event-dispatch thread-pool="defaultDiskPool" />
    <write-behind thread-pool="defaultWriteBehindPool" />
    <disk-store thread-pool="defaultDiskPool" />

    <cache alias="foo">
        <key-type>java.lang.Long</key-type>
        <value-type>java.lang.String</value-type>
        <resources>
            <heap unit="entries">2000</heap>
            <offheap unit="MB">500</offheap>
            <disk persistent="true" unit="MB">640</disk>
        </resources>
    </cache>
    <!--缓存配置 -->
    <cache-template name="myDefaults">
        <key-type>java.lang.Long</key-type>
        <value-type>java.lang.String</value-type>
        <heap unit="entries">200</heap>

    </cache-template>

    <cache alias="bar" uses-template="myDefaults">

    </cache>

    <cache alias="simpleCache" uses-template="myDefaults" />





</config>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值