#J2Cache configuration


#########################################
# Cache Broadcast Method
# values:
# jgroups -> use jgroups's multicast
# redis -> use redis publish/subscribe mechanism
# xx.xxxx.xxxx.Xxxxx your own cache broadcast policy classname that implement net.oschina.j2cache.ClusterPolicy
#########################################

j2cache.broadcast = redis

#\u7EC4\u64AD\u7684\u901A\u9053\u540D\u79F0
jgroups.channel.name = j2cache
jgroups.configXml = /j2cache/network.xml

#########################################
# Level 1&2 provider 
# values:
# none -> disable this level cache
# ehcache -> use ehcache2 as level 1 cache
# ehcache3 -> use ehcache3 as level 1 cache
# caffeine -> use caffeine as level 1 cache(only in memory)
# redis -> use redis(hashs) as level 2 cache
# [classname] -> use custom provider 
#########################################

j2cache.L1.provider_class = caffeine
j2cache.L2.provider_class = redis

#########################################
# Cache Serialization Provider
# values:
# fst -> fast-serialization
# kyro -> kyro
# java -> java standard
# [classname implements Serializer]
#########################################

j2cache.serialization = fst

#########################################
# Ehcache configuration
#########################################

ehcache.configXml = /j2cache/ehcache.xml

ehcache3.configXml = /j2cache/ehcache3.xml
ehcache3.defaultHeapSize = 1000

#########################################
# Caffeine configuration
# caffeine.region.[name] = size, xxxx[s|m|h|d]
#
#########################################
caffeine.properties = /j2cache/caffeine.properties
caffeine.region.default = 1000, 1h 

#########################################
# Redis connection configuration
#########################################

#########################################
# Redis Cluster Mode
#
# single -> single redis server
# sentinel -> master-slaves servers
# cluster -> cluster servers (\u6570\u636E\u5E93\u914D\u7F6E\u65E0\u6548\uFF0C\u4F7F\u7528 database = 0\uFF09
# sharded -> sharded servers  (\u5BC6\u7801\u3001\u6570\u636E\u5E93\u5FC5\u987B\u5728 hosts \u4E2D\u6307\u5B9A\uFF0C\u4E14\u8FDE\u63A5\u6C60\u914D\u7F6E\u65E0\u6548 ; redis://user:password@127.0.0.1:6379/0\uFF09
#
#########################################

redis.mode = single

#redis storage mode (generic|hash)
redis.storage = generic

## redis pub/sub channel name
redis.channel = j2cache
## redis pub/sub server (using redis.hosts when empty)
redis.channel.host =

#cluster name just for sharded
redis.cluster_name = j2cache

## redis cache namespace optional, default[j2cache]
redis.namespace = 

## connection
#redis.hosts = 127.0.0.1:6379
redis.hosts = 192.168.2.4:6380
redis.timeout = 2000
redis.password =
redis.database = 0

## redis pool properties
redis.maxTotal = 100
redis.maxIdle = 10
redis.maxWaitMillis = 5000
redis.minEvictableIdleTimeMillis = 60000
redis.minIdle = 1
redis.numTestsPerEvictionRun = 10
redis.lifo = false
redis.softMinEvictableIdleTimeMillis = 10
redis.testOnBorrow = true
redis.testOnReturn = false
redis.testWhileIdle = true
redis.timeBetweenEvictionRunsMillis = 300000
redis.blockWhenExhausted = false
