-->
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: cache non existing values
PostPosted: Wed Jul 19, 2006 9:45 am 
Newbie

Joined: Wed Jul 19, 2006 9:27 am
Posts: 1
hi,

I have properties (name+value) stored in a data base table and use hibernate to access then. I use a second level cache (ehcache) for efficiency reasons.

Also have the particularity that most of the times the value doesn't exist in the table, so the query returns null.

The problem is that only existing values are stored in the second level cache.

I mean, if i do this one thousand times:
session.get(Property.class, "non.existing.name"),
it will execute the sql statement each time, and always return null. The cache won't help.


My question is:
is there another cache implementation that also caches null values?
or should i use a query-cache???

I use hibernate 3.1
and DB2 v5r3

thanks,
daniel


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.