Joined: Wed May 26, 2004 9:56 am Posts: 1
|
In the past few days I've been taking a look at the hibernate cache with EHCache. I think I've got the hang of session, second level and query cache and it works just fine.
There's only one strange thing I ran into.
When I have a query with setCachable(true) and <cache usage="read-only"/> in the corresponding mapping file everything works fine.
But when I remove the line <cache usage="read-only"/> in the mapping file and leave setCachable(true) the query is executed four times!!
When I remove the line <cache usage="read-only"/> in the mapping file and set setCachable(false) the query is executed one time which is the expected behaviour!!
I've been stepping through my code and I'm sure it's not me executing the query four times!
Is this a bug or expected behaviour?
|
|