1 line
1.9 KiB
XML
1 line
1.9 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<beans profile="spring-memcache.xml" xmlns="http://www.springframework.org/schema/beans"
|
|
xmlns:cache="http://www.springframework.org/schema/cache"
|
|
xmlns:c="http://www.springframework.org/schema/c"
|
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
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">
|
|
|
|
<!--memcached 客户端***start-->
|
|
<bean id="memcachedPool" class="com.danga.MemCached.SockIOPool"
|
|
factory-method="getInstance" init-method="initialize" destroy-method="shutDown">
|
|
<constructor-arg>
|
|
<value>neeaMemcachedPool</value>
|
|
</constructor-arg>
|
|
<property name="servers">
|
|
<list>
|
|
<value>${memcache.server}</value>
|
|
</list>
|
|
</property>
|
|
<property name="initConn">
|
|
<value>${memcache.initConn}</value>
|
|
</property>
|
|
<property name="minConn">
|
|
<value>${memcache.minConn}</value>
|
|
</property>
|
|
<property name="maxConn">
|
|
<value>${memcache.maxConn}</value>
|
|
</property>
|
|
<property name="maintSleep">
|
|
<value>${memcache.maintSleep}</value>
|
|
</property>
|
|
<property name="nagle">
|
|
<value>${memcache.nagle}</value>
|
|
</property>
|
|
<property name="socketTO">
|
|
<value>${memcache.socketTO}</value>
|
|
</property>
|
|
</bean>
|
|
|
|
<!--memcached client -->
|
|
<bean id="memcachedClient" class="com.danga.MemCached.MemCachedClient">
|
|
<constructor-arg>
|
|
<value>neeaMemcachedPool</value>
|
|
</constructor-arg>
|
|
<!--
|
|
<property name="compressEnable">
|
|
<value>true</value>
|
|
</property>
|
|
<property name="compressThreshold">
|
|
<value>4096</value>
|
|
</property>
|
|
-->
|
|
</bean>
|
|
|
|
<bean id="cacheHandler" class="com.mobile.cache.CacheHandler">
|
|
<property name="cache" ref="memcachedClient"/>
|
|
</bean>
|
|
<!--memcached 客户端***end-->
|
|
</beans> |