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: Query Cache And L2 Cache Behavior
PostPosted: Wed Jun 14, 2006 5:14 am 
Newbie

Joined: Mon Apr 24, 2006 5:16 am
Posts: 3
Hi all!
I have Hibernate program with use_query_cache ON and use_second_level_cache ON.

I have problem describet follow example.

1 Moment
When I execute some query createQuery("from Orders where status in (1,2) ") the Orders's Ids will saved Query Cache, and Orders's object will saved in SecondLevel Cache. The query returned 10 Orders (there are Orders with Id = 12345 (for example).

2. Moment

I execute load(Orders.class, new Integer(12345)); Hibernate finds this object from L2 (loaded on Moment 1) and no generate query from DB. I change Orders with Id = 12345 and save it without save to DB (Orders 12345 no evicted from L2).

3. Moment
When I execute query createQuery("from Orders where status in (1) ") the query return 7 Orders and among which there was also this record object Orders with Id = 12345.

What occurs ?
1. The Orders 12345 will refreshed from DB and change on Moment 2 was lost ? Or
2. The Orders 12345 no will change on 3 Moment ?


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.