Welcome 微信登录
编程资源 图片资源库 蚂蚁家优选 PDF转换器 软件资源

软件开发小程序制作系统集成与运维空间租用硬件开发视频监控技术咨询与支持——联系电话:0311-88999002/88999003

首页 / 软件开发 / JAVA / Ehcache缓存框架

Ehcache缓存框架2011-10-22 z7swf Kernel: ehcache.jar

Xml:ehcache.xml

Xml代码

<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ehcache.xsd">
<diskStore path="c:\temp" />
<cacheManagerEventListenerFactory class="" properties="" />

<!--
Uncomment the following in a clustered configuration.
-->

<!--<cacheManagerPeerProviderFactory
class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
properties="peerDiscovery=automatic,multicastGroupAddress=230.0.0.1,multicastGroupPort=4446, timeToLive=1"
propertySeparator=","
/>
<cacheManagerPeerListenerFactory
class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory"
/>-->

<!--
Hibernate will use the defaultCache unless custom configurations are defined
below for individual domain objects, collection, queries, etc.
-->

<defaultCache
maxElementsInMemory="10000"
eternal="false"
timeToIdleSeconds="600"
overflowToDisk="true"
>
<!--<cacheEventListenerFactory class="net.sf.ehcache.distribution.RMICacheReplicatorFactory" />
<bootstrapCacheLoaderFactory class="net.sf.ehcache.distribution.RMIBootstrapCacheLoaderFactory" />-->
</defaultCache>

<!--
The cache name is the same as the class name specified in your Hibernate
mapping file.
-->

<cache
name="sampleCache"
maxElementsInMemory="5"
maxElementsOnDisk="100"
eternal="false"
timeToIdleSeconds="2"
timeToLiveSeconds="2"
overflowToDisk="true"
>
<!--<cacheEventListenerFactory class="net.sf.ehcache.distribution.RMICacheReplicatorFactory" />
<bootstrapCacheLoaderFactory class="net.sf.ehcache.distribution.RMIBootstrapCacheLoaderFactory" />-->
</cache>
</ehcache>