-->
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 turn off caching
PostPosted: Mon Jan 02, 2006 9:16 am 
Newbie

Joined: Tue Dec 27, 2005 9:01 am
Posts: 2
I want to use hibernate in a swing application without a server component beside the database.

So I need to turn off the caching mechanism complete in order to get always the newest data from the database. I tried to turn off by setting the hibernate configuration parameters:
<property name="hibernate.cache.use_query_cache">false</property>
<property name="hibernate.cache.use_second_level_cache">false</property>

Unfortunately this doesn't work, because if I test I didn't get new records in my second application which I have already added in my first application.

I also tried to call flush() after all calls but with the same result.

Can anybody help me?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 02, 2006 10:14 am 
Beginner
Beginner

Joined: Wed Apr 20, 2005 9:30 am
Posts: 39
You could always build a simple/custom cache provider/implementer that would in fact cache nothing - always return nulls so that items are looked up every time. Would also save the overhead of carrying one of the stock cache implementations around.

Just a thought...


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.