-->
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.  [ 1 post ] 
Author Message
 Post subject: How to avoid L1 cache.
PostPosted: Mon Feb 02, 2015 10:34 am 
Beginner
Beginner

Joined: Sat Jun 24, 2006 7:05 am
Posts: 20
I need to build a JPA/Hibernate application on a database wich can be modified from outside my application.
I execute a query and show my data to users but, in mean time, data can change but when I execute the query again I see old version of data and not the new one.
I believe this is a behaviour coming from L1 cache.
Is there any way to instruct hibernate to reread data from DB for a given query or for every query bypassing L1 cache ?
I know there's a refresh method in EntityManager but it refreshes only one entity doing a query in the DB : this is dramatic for performances .
Clearing the cache before any query is not viable in my environment because of errors coming from detaching entities.
Tks for all suggestion.
Tks


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

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.