title: Testing for ehcache
body: <p>I am using Java, Hibernate and Spring in my project. I am working on a huge set of data so I have implemented ehcache to cache the tables and result set on the first time.</p>
  
  <p>But I dont know whether the data is getting loaded from cache the following times. How can I test this? Any help will be appreciated. This is how I have configured ehcache.</p>
  
  <pre><code>&lt;prop key="hibernate.cache.use_second_level_cache"&gt;true&lt;/prop&gt;  
  &lt;prop key="hibernate.cache.provider_class"&gt;net.sf.ehcache.hibernate.SingletonEhCacheProvider&lt;/prop&gt;  
  &lt;prop key="hibernate.cache.use_query_cache"&gt;true&lt;/prop&gt;
  </code></pre>
  
  <p>Then I have kept <code>ehcache.xml</code> in the classpath. Is this enough? How can I test whether it's working or not?</p>