Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">

  <bean id="memcachedClient" class="org.smallmind.persistence.cache.memcached.spring.MemcachedClientFactoryBean" destroy-method="shutdown">
    <property name="poolSize" value="${memcached.pool.size.max}"/>
    <property name="servers">
      <bean class="org.smallmind.persistence.cache.memcached.spring.MemcachedServerFactoryBean">
        <property name="serverPattern" value="${memcached.server_pattern}"/>
        <property name="serverSpread" value="${memcached.server_spread}"/>
      </bean>
    </property>
  </bean>

  <bean id="memcachedCacheDomain" class="org.smallmind.persistence.cache.memcached.spring.MemcachedCacheDomainFactoryBean">
    <property name="memcachedClient" ref="memcachedClient"/>
    <property name="discriminator" value="PC"/>
    <property name="timeToLiveSeconds" value="${memcached.ttl.default}"/>
    <property name="timeToLiveOverrideMap">
      <map>
        <entry key="com.mydomain.MyDurable" value="${memcached.ttl.override}"/>
      </map>
    </property>
  </bean>

  <bean id="memcachedCacheDao" class="org.smallmind.persistence.cache.memcached.spring.MemcachedCacheDaoFactoryBean">
    <property name="memcachedCacheDomain" ref="memcachedCacheDomain"/>
  </bean>

</beans>
New to GrepCode? Check out our FAQ X