title: How to set max number of entries for different caches in the Redis cache manager in spring boot application?
body: <p>In a Spring Boot app I'm doing the migration from a local cache implemented with <code>Caffeine</code> to a <code>Redis</code> distributed cache. </p>
  
  <p>I see in  <code>Caffeine</code> cache that we can set the maximum number of entries</p>
  
  <pre class="lang-java prettyprint-override"><code>Cache cache = new CaffeineCache(cacheName, Caffeine.newBuilder()
                  .recordStats()
                  .expireAfterWrite(expireIn, TimeUnit.SECONDS)
                  .maximumSize(maxSize)
                  .build());
  </code></pre>
  
  <p>Can the same be achieved in code for <code>Redis</code>? I need to set the different values for different cache names.</p>