Beginner |
|
Joined: Wed Aug 31, 2005 3:54 am Posts: 45
|
I do the following test :
open a session
get one objet
see sql request with p6spy [i find the request to get my object]
trace session cache [session.getStatistics().getEntityKeys().size() = 1]
trace sessionFactory cache [SecondLevelCachePutCount = 1]
make a session clear
trace session cache [session.getStatistics().getEntityKeys().size() = 0]
trace sessionFactory cache [SecondLevelCachePutCount = 1]
get the same objet
see sql request with p6spy [i find the request again]
close the session [;-)]
So although i have my object in SessionFactory Cache, hibernate
run again the sql request to get my object !
Why ?
Thanks
|
|