-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: How to make changes reflect immediately to cache
PostPosted: Sat Apr 11, 2009 8:27 am 
Newbie

Joined: Sat Apr 11, 2009 8:19 am
Posts: 3
Hi,
I am running a web application which uses hibernate for persistance of the data.
When i make some changes to the database manually, it doesn't reflect in the hibernate cache. I mean when i fetch a set from a class, it gives size zero. Can anyone please help me figuring this out.
Is there any way to expire the hibernate cache manually and ask it to recache everything from the database.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 13, 2009 8:52 pm 
Red Hat Associate
Red Hat Associate

Joined: Mon Aug 16, 2004 11:14 am
Posts: 253
Location: Raleigh, NC
Yes. This is all in the caching chapter of the manual. Look for Session.evict() and SessionFactory.evict(). You can also configure your cache provider to expire information after some timeout, this way you don't have to "manually" manage your caches.

-Chris

_________________
Chris Bredesen
Senior Software Maintenance Engineer, JBoss


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.