We are using hibernate version 4.3.11.
We have a couple of java applications that refer to the same hibernate.cfg.xml, where in, second level cache and statistics are enabled.
We have enabled second level caching for an entity in abc.hbm.xml as
<cache usage=“nonstrict-read-write”/>
. It is joined to another table xyz, caching is enabled for that also using
<cache usage=“nonstrict-read-write”/>
The statistics displayed in 1.log for one application is -
Second Level Cache Counts: Hits: 6 Misses: 2 Puts: 34
Second Level Cache Region 0: com.abc.xyz -
Size In Memory: 400 Element Count In Memory: 2
Second Level Cache Region 1: com.abc -
Size In Memory: 21192 Element Count In Memory: 32
While the statistics displayed in the 2.log for another application is -
Second Level Cache Counts: Hits: 0 Misses: 0 Puts: 32
Second Level Cache Region 0: com.abc.xyz -
Size In Memory: 0 Element Count In Memory: 0
Second Level Cache Region 1: com.abc -
Size In Memory: 0 Element Count In Memory: 0
The logs in 1.log make sense, as it has misses > 0, so it is bound to have puts.
But in 2.log there are no misses still 32 puts. Also the region information for it shows Element count in memory as 0. Then how come it has 32 puts. What are these puts?
How can we know what is being put?