-2

. The cache objects values are hibernate entities bear in mind it had stored in level 2 cache as well. When we see the Ehcache statistics , it is always twice the no of objects . We thought we set eternal to true to our cache , but it seems keys present but value is disappeared , we suspect the entities are evicted from hibernate l2 cache . It’s really so difficult to re produce

  • We want the cache to never expire . But the values are hibernate entities . It seems we get random evictions , – Chukkani Dec 20 '19 at 07:56

1 Answers1

0

The problem is identified .

Our app is using hibernate query level cache and second level cache also. On the startup , we have a configuration ( which is cached in query level and second level) cached into our own cache ( using hCache). When hibernate executes a native query which is a commit for one of the entity , hibernate is invalidating the second level cache for most of the entities .