changed to ehcache inmemory store configuratinos
This commit is contained in:
committed by
Keith Woodlock
parent
72ceb5340f
commit
802df9b34a
@@ -163,8 +163,7 @@ dependencies {
|
||||
[group: 'org.quartz-scheduler', name: 'quartz', version: '2.1.7'],
|
||||
[group: 'com.amazonaws', name: 'aws-java-sdk', version: '1.2.1'],
|
||||
|
||||
[group: 'com.google.code.simple-spring-memcached', name: 'xmemcached-provider', version: '3.2.0'],
|
||||
[group: 'com.google.code.simple-spring-memcached', name: 'spring-cache', version: '3.2.0']
|
||||
[group: 'net.sf.ehcache', name: 'ehcache', version: '2.7.2']
|
||||
)
|
||||
|
||||
testCompile 'junit:junit:4.10',
|
||||
|
||||
@@ -58,6 +58,6 @@
|
||||
|
||||
<import resource="securityContext.xml" />
|
||||
|
||||
<import resource="memcached.xml" />
|
||||
<import resource="cache.xml" />
|
||||
|
||||
</beans>
|
||||
@@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
This Source Code Form is subject to the terms of the Mozilla Public
|
||||
License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
-->
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xmlns:tx="http://www.springframework.org/schema/tx"
|
||||
xmlns:p="http://www.springframework.org/schema/p"
|
||||
xmlns:cache="http://www.springframework.org/schema/cache"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
|
||||
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
|
||||
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
|
||||
http://www.springframework.org/schema/cache http://www.springframework.org/schema/cache/spring-cache.xsd">
|
||||
|
||||
<bean id="cacheManager" class="org.springframework.cache.ehcache.EhCacheCacheManager"
|
||||
p:cacheManager-ref="ehcache" />
|
||||
|
||||
<bean id="ehcache"
|
||||
class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean"
|
||||
p:configLocation="classpath:/META-INF/spring/ehcache.xml" p:shared="true" />
|
||||
|
||||
</beans>
|
||||
@@ -0,0 +1,29 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
This Source Code Form is subject to the terms of the Mozilla Public
|
||||
License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
-->
|
||||
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="http://ehcache.org/ehcache.xsd">
|
||||
<defaultCache eternal="true" maxEntriesLocalHeap="100"
|
||||
overflowToDisk="false" />
|
||||
<cache name="users" maxEntriesLocalHeap="10000" eternal="true"
|
||||
overflowToDisk="false" />
|
||||
<cache name="offices" maxEntriesLocalHeap="10000" eternal="true"
|
||||
overflowToDisk="false" />
|
||||
<cache name="office_template" maxEntriesLocalHeap="10000"
|
||||
eternal="true" overflowToDisk="false" />
|
||||
<cache name="charges" maxEntriesLocalHeap="10000" eternal="true"
|
||||
overflowToDisk="false" />
|
||||
<cache name="funds" maxEntriesLocalHeap="10000" eternal="true"
|
||||
overflowToDisk="false" />
|
||||
<cache name="code_values" maxEntriesLocalHeap="10000" eternal="true"
|
||||
overflowToDisk="false" />
|
||||
<cache name="codes" maxEntriesLocalHeap="10000" eternal="true"
|
||||
overflowToDisk="false" />
|
||||
<cache name="roles" maxEntriesLocalHeap="10000" eternal="true"
|
||||
overflowToDisk="false" />
|
||||
</ehcache>
|
||||
@@ -1,200 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
|
||||
xmlns:tx="http://www.springframework.org/schema/tx"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
|
||||
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
|
||||
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd">
|
||||
|
||||
<!-- Cache manager -->
|
||||
<bean name="cacheManager" class="com.google.code.ssm.spring.ExtendedSSMCacheManager">
|
||||
<property name="caches">
|
||||
<set>
|
||||
<bean class="com.google.code.ssm.spring.SSMCache">
|
||||
<constructor-arg name="cache" index="0" ref="users" />
|
||||
<constructor-arg name="expiration" index="1" value="0" />
|
||||
<constructor-arg name="allowClear" index="2" value="true" />
|
||||
</bean>
|
||||
<bean class="com.google.code.ssm.spring.SSMCache">
|
||||
<constructor-arg name="cache" index="0" ref="roles" />
|
||||
<constructor-arg name="expiration" index="1" value="0" />
|
||||
<constructor-arg name="allowClear" index="2" value="true" />
|
||||
</bean>
|
||||
<bean class="com.google.code.ssm.spring.SSMCache">
|
||||
<constructor-arg name="cache" index="0" ref="offices" />
|
||||
<constructor-arg name="expiration" index="1" value="0" />
|
||||
<constructor-arg name="allowClear" index="2" value="true" />
|
||||
</bean>
|
||||
<bean class="com.google.code.ssm.spring.SSMCache">
|
||||
<constructor-arg name="cache" index="0" ref="office_template" />
|
||||
<constructor-arg name="expiration" index="1" value="0" />
|
||||
<constructor-arg name="allowClear" index="2" value="true" />
|
||||
</bean>
|
||||
<bean class="com.google.code.ssm.spring.SSMCache">
|
||||
<constructor-arg name="cache" index="0" ref="charges" />
|
||||
<constructor-arg name="expiration" index="1" value="0" />
|
||||
<constructor-arg name="allowClear" index="2" value="true" />
|
||||
</bean>
|
||||
<bean class="com.google.code.ssm.spring.SSMCache">
|
||||
<constructor-arg name="cache" index="0" ref="funds" />
|
||||
<constructor-arg name="expiration" index="1" value="0" />
|
||||
<constructor-arg name="allowClear" index="2" value="true" />
|
||||
</bean>
|
||||
<bean class="com.google.code.ssm.spring.SSMCache">
|
||||
<constructor-arg name="cache" index="0" ref="code_values" />
|
||||
<constructor-arg name="expiration" index="1" value="0" />
|
||||
<constructor-arg name="allowClear" index="2" value="true" />
|
||||
</bean>
|
||||
<bean class="com.google.code.ssm.spring.SSMCache">
|
||||
<constructor-arg name="cache" index="0" ref="codes" />
|
||||
<constructor-arg name="expiration" index="1" value="0" />
|
||||
<constructor-arg name="allowClear" index="2" value="true" />
|
||||
</bean>
|
||||
</set>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean name="users" class="com.google.code.ssm.CacheFactory">
|
||||
<property name="cacheName" value="users" />
|
||||
<property name="cacheClientFactory">
|
||||
<bean name="cacheClientFactory"
|
||||
class="com.google.code.ssm.providers.xmemcached.MemcacheClientFactoryImpl" />
|
||||
</property>
|
||||
<property name="addressProvider">
|
||||
<bean class="com.google.code.ssm.config.DefaultAddressProvider">
|
||||
<property name="address" value="127.0.0.1:11211" />
|
||||
</bean>
|
||||
</property>
|
||||
<property name="configuration">
|
||||
<bean class="com.google.code.ssm.providers.CacheConfiguration">
|
||||
<property name="consistentHashing" value="true" />
|
||||
</bean>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean name="roles" class="com.google.code.ssm.CacheFactory">
|
||||
<property name="cacheName" value="roles" />
|
||||
<property name="cacheClientFactory">
|
||||
<bean name="cacheClientFactory"
|
||||
class="com.google.code.ssm.providers.xmemcached.MemcacheClientFactoryImpl" />
|
||||
</property>
|
||||
<property name="addressProvider">
|
||||
<bean class="com.google.code.ssm.config.DefaultAddressProvider">
|
||||
<property name="address" value="127.0.0.1:11211" />
|
||||
</bean>
|
||||
</property>
|
||||
<property name="configuration">
|
||||
<bean class="com.google.code.ssm.providers.CacheConfiguration">
|
||||
<property name="consistentHashing" value="true" />
|
||||
</bean>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean name="offices" class="com.google.code.ssm.CacheFactory">
|
||||
<property name="cacheName" value="offices"/>
|
||||
<property name="cacheClientFactory">
|
||||
<bean name="cacheClientFactory"
|
||||
class="com.google.code.ssm.providers.xmemcached.MemcacheClientFactoryImpl" />
|
||||
</property>
|
||||
<property name="addressProvider">
|
||||
<bean class="com.google.code.ssm.config.DefaultAddressProvider">
|
||||
<property name="address" value="127.0.0.1:11211" />
|
||||
</bean>
|
||||
</property>
|
||||
<property name="configuration">
|
||||
<bean class="com.google.code.ssm.providers.CacheConfiguration">
|
||||
<property name="consistentHashing" value="true" />
|
||||
</bean>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean name="office_template" class="com.google.code.ssm.CacheFactory">
|
||||
<property name="cacheName" value="office_template" />
|
||||
<property name="cacheClientFactory">
|
||||
<bean name="cacheClientFactory"
|
||||
class="com.google.code.ssm.providers.xmemcached.MemcacheClientFactoryImpl" />
|
||||
</property>
|
||||
<property name="addressProvider">
|
||||
<bean class="com.google.code.ssm.config.DefaultAddressProvider">
|
||||
<property name="address" value="127.0.0.1:11211" />
|
||||
</bean>
|
||||
</property>
|
||||
<property name="configuration">
|
||||
<bean class="com.google.code.ssm.providers.CacheConfiguration">
|
||||
<property name="consistentHashing" value="true" />
|
||||
</bean>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean name="charges" class="com.google.code.ssm.CacheFactory">
|
||||
<property name="cacheName" value="charges" />
|
||||
<property name="cacheClientFactory">
|
||||
<bean name="cacheClientFactory"
|
||||
class="com.google.code.ssm.providers.xmemcached.MemcacheClientFactoryImpl" />
|
||||
</property>
|
||||
<property name="addressProvider">
|
||||
<bean class="com.google.code.ssm.config.DefaultAddressProvider">
|
||||
<property name="address" value="127.0.0.1:11211" />
|
||||
</bean>
|
||||
</property>
|
||||
<property name="configuration">
|
||||
<bean class="com.google.code.ssm.providers.CacheConfiguration">
|
||||
<property name="consistentHashing" value="true" />
|
||||
</bean>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean name="funds" class="com.google.code.ssm.CacheFactory">
|
||||
<property name="cacheName" value="funds" />
|
||||
<property name="cacheClientFactory">
|
||||
<bean name="cacheClientFactory"
|
||||
class="com.google.code.ssm.providers.xmemcached.MemcacheClientFactoryImpl" />
|
||||
</property>
|
||||
<property name="addressProvider">
|
||||
<bean class="com.google.code.ssm.config.DefaultAddressProvider">
|
||||
<property name="address" value="127.0.0.1:11211" />
|
||||
</bean>
|
||||
</property>
|
||||
<property name="configuration">
|
||||
<bean class="com.google.code.ssm.providers.CacheConfiguration">
|
||||
<property name="consistentHashing" value="true" />
|
||||
</bean>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean name="codes" class="com.google.code.ssm.CacheFactory">
|
||||
<property name="cacheName" value="codes" />
|
||||
<property name="cacheClientFactory">
|
||||
<bean name="cacheClientFactory"
|
||||
class="com.google.code.ssm.providers.xmemcached.MemcacheClientFactoryImpl" />
|
||||
</property>
|
||||
<property name="addressProvider">
|
||||
<bean class="com.google.code.ssm.config.DefaultAddressProvider">
|
||||
<property name="address" value="127.0.0.1:11211" />
|
||||
</bean>
|
||||
</property>
|
||||
<property name="configuration">
|
||||
<bean class="com.google.code.ssm.providers.CacheConfiguration">
|
||||
<property name="consistentHashing" value="true" />
|
||||
</bean>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean name="code_values" class="com.google.code.ssm.CacheFactory">
|
||||
<property name="cacheName" value="code_values" />
|
||||
<property name="cacheClientFactory">
|
||||
<bean name="cacheClientFactory"
|
||||
class="com.google.code.ssm.providers.xmemcached.MemcacheClientFactoryImpl" />
|
||||
</property>
|
||||
<property name="addressProvider">
|
||||
<bean class="com.google.code.ssm.config.DefaultAddressProvider">
|
||||
<property name="address" value="127.0.0.1:11211" />
|
||||
</bean>
|
||||
</property>
|
||||
<property name="configuration">
|
||||
<bean class="com.google.code.ssm.providers.CacheConfiguration">
|
||||
<property name="consistentHashing" value="true" />
|
||||
</bean>
|
||||
</property>
|
||||
</bean>
|
||||
</beans>
|
||||
Reference in New Issue
Block a user