ehcache 3 配置文件

来源:互联网 发布:苹果的乐器软件 编辑:程序博客网 时间:2024/06/05 04:19

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
原创粉丝点击