title: Spring boot 2 - memcached
body: <p>I'm trying to create a cache using memcached with lib <a href="https://github.com/sixhours-team/memcached-spring-boot" rel="nofollow noreferrer">https://github.com/sixhours-team/memcached-spring-boot</a></p>
  
  <p>I think I have done everything but it does not work.
  My code is:</p>
  
  <p>pom.xml</p>
  
  <pre><code>    &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-cache&lt;/artifactId&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;io.sixhours&lt;/groupId&gt;
          &lt;artifactId&gt;memcached-spring-boot-starter&lt;/artifactId&gt;
          &lt;version&gt;1.3.0&lt;/version&gt;
      &lt;/dependency&gt;
  </code></pre>
  
  <p>apllication.yml</p>
  
  <pre><code>memcached.cache:
    servers: localhost:11211
    mode: static
    expirations: 3600
  </code></pre>
  
  <p>app. code</p>
  
  <pre><code>@SpringBootApplication
  @EnableCaching
  public class CRMProxyApplication extends SpringBootServletInitializer {
  </code></pre>
  
  <hr>
  
  <pre><code> @Cacheable("couponCache")
   @GetMapping(path = Mappings.GET_BEST_OF_AMAZON, produces = 
   MediaType.APPLICATION_JSON_VALUE)
   public ResponseEntity&lt;Object&gt; getCouponList(@RequestParam(value = "p_client_uid") Integer pClientUID) {
          return new ResponseEntity&lt;&gt; (couponManagementService.getCouponList(pClientUID), HttpStatus.OK);}
  </code></pre>
  
  <hr>
  
  <p>When application starting, log show </p>
  
  <pre><code> INFO net.spy.memcached.MemcachedConnection:  Added {QA sa=/127.0.0.1:11211, #Rops=0, #Wops=0, #iq=0, topRop=null, topWop=null, toWrite=0, interested=0} to connect queue
  </code></pre>
  
  <p>Using Spring Boot version 2.0.6
  MacOS</p>
  
  <p>What am I doing wrong ? :)</p>
  
  <p>PS: If if anyone has a working example pls share.       </p>