-->
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: Invalidate L2 cache region
PostPosted: Thu Apr 27, 2006 3:07 am 
Newbie

Joined: Mon Apr 24, 2006 5:16 am
Posts: 3
I have cache query and a certain class has been loaded in cache completely type like a follow:

List clients = sess.createCriteria(Client.class)
.setCacheable(true)
.list();

while I do not change the Client, it is work properly - all objects loaded from L2 cache. Database no action.


If there are copy of created object Client in other session / thread created and kept

tr = sess.beginTransaction();
Client cl = new Client();
sess.save(cl);
tr.commit();
sess.close();


That this action will cause invalidete region cache :


2006-04-27 09:47:48,109 (UpdateTimestampsCache.java:51) - Pre-invalidating space [Client]

insert occur ..


2006-04-27 09:47:48,281 (UpdateTimestampsCache.java:64) - Invalidating space [Client], timestamp: 1146116868281


How to make so that query

List clients = sess.createCriteria(Client.class)
.setCacheable(true)
.list();

did not access in a DB (so invalidete query region), in fact all necessary data already are in L2 cache !


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.