Hi,
During performing some performance tuning in my application I have noticed, that hibernate query cache is never used.
I am quite sure I have it properly set up:
- hibernate.cache.provider_class=org.hibernate.cache.EhCacheProvider
- hibernate.cache.use_query_cache=true
- I use
setCacheable(true)
on queries I want to cache
I have set up a simple stress test, when I perform the same set of operations over and over by several threads. When I check hibernate statistics it turns out that query cache hitCount is zero!
What am I missing?
EDIT:
For all of you asking: I have set hibernate.generate_statistics = true