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
|