title: Limit cache size using JCache configuration API
body: <p>I am using JCache API to configure caches in my application that uses spring caching with Ehcache 3.</p>
  
  <pre><code>cacheManager.createCache("users", new MutableConfiguration&lt;String, User&gt;()
                      .setStoreByValue(false)
                      .setManagementEnabled(true)
                      .setStatisticsEnabled(true)
                      .setExpiryPolicyFactory(CreatedExpiryPolicy.factoryOf(Duration.TEN_MINUTES)));
  </code></pre>
  
  <p>How can I limit cache size to say 50 entries? It is easy to do it via Ehcache XML configuration but if there is a way to control this using JCache config API I would prefer to use that.</p>