-->
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.  [ 4 posts ] 
Author Message
 Post subject: Clear Hibernate Second Level Cache
PostPosted: Mon Aug 22, 2005 3:23 am 
Newbie

Joined: Thu Jun 02, 2005 5:03 am
Posts: 15
Is there any way to clear hibernate second level cache?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 22, 2005 3:31 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
SessionFactory.evictXXXXX()


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 22, 2005 3:38 am 
Newbie

Joined: Thu Jun 02, 2005 5:03 am
Posts: 15
The evictXXX() methods evict the cached state of an instance, entire class, collection instance or entire collection role. I want to clear the complete second level cache. if i have to do that i have to call these evictXXX() methods for each class and collection which is cumbersome.

Is there any way to clear the complete second level cache using a single call. Just like we have Session.clear() for first level cache


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 22, 2005 3:42 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
Use SessionFactory.getAllClassMetadata() and iterate.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.