title: How properly use hibernate cache (warning The Ehcache second-level cache provider for Hibernate is deprecated)
body: <p>I'm using hibernate 5.3.7-Final with hibernate-ehcache-5.3.7.Final. In pom.xml I have:</p>
  
  <pre><code>    &lt;dependency&gt;
          &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
          &lt;artifactId&gt;hibernate-core&lt;/artifactId&gt;
          &lt;version&gt;5.3.7.Final&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
          &lt;artifactId&gt;hibernate-ehcache&lt;/artifactId&gt;
          &lt;version&gt;5.3.7.Final&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.ehcache&lt;/groupId&gt;
          &lt;artifactId&gt;ehcache&lt;/artifactId&gt;
          &lt;version&gt;3.3.1&lt;/version&gt;
      &lt;/dependency&gt;
  </code></pre>
  
  <p>I would use hibernate-cache so in hibernate.cfg.xml I have:</p>
  
  <pre><code>    &lt;property name="cache.use_second_level_cache"&gt;true&lt;/property&gt;
      &lt;property name="hibernate.cache.use_query_cache"&gt;true&lt;/property&gt;
      &lt;property name="cache.region.factory_class"&gt;org.hibernate.cache.ehcache.EhCacheRegionFactory&lt;/property&gt;
      &lt;property name="hibernate.cache.provider_class"&gt;org.hibernate.cache.EhCacheProvider&lt;/property&gt;
  </code></pre>
  
  <p>But when I started my application I see warning </p>
  
  <pre><code>Dez 17, 2018 6:06:43 PM 
  org.hibernate.cache.ehcache.internal.EhcacheRegionFactory &lt;init&gt;
  WARN: HHH020100: The Ehcache second-level cache provider for Hibernate is 
  deprecated.  See https://hibernate.atlassian.net/browse/HHH-12441 for details.
  </code></pre>
  
  <p>Can anyone tell me, why I see this warning and what did I do wrong? Thanks in advance.</p>