title: How to create RedisCacheManager in spring-data 2.0.x
body: <p>I'm migrating my application from spring boot 1.5.x to 2.0.x. I want to keep jedis but I have a problem with the instantiation of <code>RedisCacheManager</code>.</p>
  
  <p>Now constructor signature is </p>
  
  <pre><code>RedisCacheManager(RedisCacheWriter cacheWriter, RedisCacheConfiguration defaultCacheConfiguration)
  </code></pre>
  
  <p>But before it was:</p>
  
  <pre><code>RedisCacheManager(RedisOperations redisOperations)
  </code></pre>
  
  <p>I define this bean having only <code>RedisTemplate</code> in scope:</p>
  
  <pre><code>@Bean
  public RedisCacheManager redisCacheManager(RedisTemplate redisTemplate) {
      HandleRedisCacheManager redisCacheManager = new HandleRedisCacheManager(redisTemplate);
      redisCacheManager.setUsePrefix(true);
      return redisCacheManager;
  }
  </code></pre>
  
  <p>How is it supposed to be created now?</p>