aspose file tools*
The moose likes Object Relational Mapping and the fly likes How to check  Secondary Cache? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "How to check  Secondary Cache?" Watch "How to check  Secondary Cache?" New topic
Author

How to check Secondary Cache?

Ramana Kamal
Greenhorn

Joined: Dec 29, 2006
Posts: 1
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

Joined: Jan 10, 2002
Posts: 61766
    
  67

"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


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17260
    
    6

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


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Lakshmi Dasari
Ranch Hand

Joined: Mar 03, 2003
Posts: 35
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 ]

Lakshmi
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to check Secondary Cache?