• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to check Secondary Cache?

 
Ramana Kamal
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I have configured Hibernate secondary level cache using EhCache.I have Ehcache.xml in classpath and i updated cache provider class in My hibernate configuration file.Now my doubt is is there any way we can test wheather caching is working or not?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65216
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Ramana KK",

There aren't many rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Thanks!
bear
JavaRanch Sheriff
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can always enable Hiberate statistics and see hit miss ratio, this will tell you if it is getting things from the second level cache.

Mark
 
Lakshmi Dasari
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to enable statistics inorder to see the hit / miss ratio. Make sure you have the property

enabled in your hibernate configuration file.

[ January 01, 2007: Message edited by: Lakshmi Dasari ]
[ January 01, 2007: Message edited by: Lakshmi Dasari ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic