Add cache.xml, config ehcache
parent
15a5ba1d54
commit
b9d135e896
|
@ -12,12 +12,61 @@
|
||||||
<defaultCache
|
<defaultCache
|
||||||
maxElementsInMemory="10000"
|
maxElementsInMemory="10000"
|
||||||
eternal="false"
|
eternal="false"
|
||||||
timeToIdleSeconds="120"
|
timeToIdleSeconds="240"
|
||||||
timeToLiveSeconds="120"
|
timeToLiveSeconds="240"
|
||||||
overflowToDisk="true"
|
overflowToDisk="true"
|
||||||
maxElementsOnDisk="10000000"
|
maxElementsOnDisk="10000000"
|
||||||
diskPersistent="false"
|
diskPersistent="false"
|
||||||
diskExpiryThreadIntervalSeconds="120"
|
diskExpiryThreadIntervalSeconds="240"
|
||||||
memoryStoreEvictionPolicy="LRU"/>
|
memoryStoreEvictionPolicy="LRU"/>
|
||||||
|
|
||||||
|
|
||||||
|
<cache name="clientDetailsCache"
|
||||||
|
maxElementsInMemory="10000"
|
||||||
|
eternal="false"
|
||||||
|
timeToIdleSeconds="240"
|
||||||
|
timeToLiveSeconds="240"
|
||||||
|
overflowToDisk="true"
|
||||||
|
maxElementsOnDisk="10000000"
|
||||||
|
diskPersistent="false"
|
||||||
|
diskExpiryThreadIntervalSeconds="240"
|
||||||
|
memoryStoreEvictionPolicy="LRU"/>
|
||||||
|
|
||||||
|
|
||||||
|
<cache name="accessTokenCache"
|
||||||
|
maxElementsInMemory="10000"
|
||||||
|
eternal="false"
|
||||||
|
timeToIdleSeconds="240"
|
||||||
|
timeToLiveSeconds="240"
|
||||||
|
overflowToDisk="true"
|
||||||
|
maxElementsOnDisk="10000000"
|
||||||
|
diskPersistent="false"
|
||||||
|
diskExpiryThreadIntervalSeconds="240"
|
||||||
|
memoryStoreEvictionPolicy="LRU"/>
|
||||||
|
|
||||||
|
|
||||||
|
<cache name="authorizationCodeCache"
|
||||||
|
maxElementsInMemory="10000"
|
||||||
|
eternal="false"
|
||||||
|
timeToIdleSeconds="240"
|
||||||
|
timeToLiveSeconds="240"
|
||||||
|
overflowToDisk="true"
|
||||||
|
maxElementsOnDisk="10000000"
|
||||||
|
diskPersistent="false"
|
||||||
|
diskExpiryThreadIntervalSeconds="240"
|
||||||
|
memoryStoreEvictionPolicy="LRU"/>
|
||||||
|
|
||||||
|
|
||||||
|
<cache name="userCache"
|
||||||
|
maxElementsInMemory="10000"
|
||||||
|
eternal="false"
|
||||||
|
timeToIdleSeconds="240"
|
||||||
|
timeToLiveSeconds="240"
|
||||||
|
overflowToDisk="true"
|
||||||
|
maxElementsOnDisk="10000000"
|
||||||
|
diskPersistent="false"
|
||||||
|
diskExpiryThreadIntervalSeconds="240"
|
||||||
|
memoryStoreEvictionPolicy="LRU"/>
|
||||||
|
|
||||||
|
|
||||||
</ehcache>
|
</ehcache>
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xmlns:cache="http://www.springframework.org/schema/cache"
|
||||||
|
xmlns:p="http://www.springframework.org/schema/p"
|
||||||
|
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||||
|
http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||||
|
http://www.springframework.org/schema/cache
|
||||||
|
http://www.springframework.org/schema/cache/spring-cache.xsd">
|
||||||
|
|
||||||
|
<cache:annotation-driven/>
|
||||||
|
|
||||||
|
<!-- cache manager -->
|
||||||
|
<bean id="cacheManager" class="org.springframework.cache.ehcache.EhCacheCacheManager" p:cacheManager-ref="ehcache"/>
|
||||||
|
|
||||||
|
<bean class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean" id="ehcache"
|
||||||
|
p:configLocation="classpath:ehcache.xml" p:shared="true"/>
|
||||||
|
|
||||||
|
</beans>
|
Loading…
Reference in New Issue