title: Is it possible to set a different specification per cache using caffeine in spring boot?
body: <p>I have a simple sprint boot application using spring boot <code>1.5.11.RELEASE</code> with <code>@EnableCaching</code> on the Application <code>Configuration</code> class.</p>
  
  <h2>pom.xml</h2>
  
  <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;com.github.ben-manes.caffeine&lt;/groupId&gt;
              &lt;artifactId&gt;caffeine&lt;/artifactId&gt;
   &lt;/dependency&gt;
  </code></pre>
  
  <h2>application.properties</h2>
  
  <pre><code>spring.cache.type=caffeine
  spring.cache.cache-names=cache-a,cache-b
  spring.cache.caffeine.spec=maximumSize=100, expireAfterWrite=1d
  </code></pre>
  
  <h2>Question</h2>
  
  <p>My question is simple, how can one specify a different size/expiration per cache. E.g. perhaps it's acceptable for <code>cache-a</code> to be valid for <code>1 day</code>. But <code>cache-b</code> might be ok for <code>1 week</code>. The specification on a caffeine cache appears to be global to the <code>CacheManager</code> rather than <code>Cache</code>. Am I missing something? Perhaps there is a more suitable provider for my use case?</p>