| To add to the root issue, that warning logging can only happen when a MaxDepthExceededException happens in Ehcache. In order to get there, the following must be true:
- Ehcache is configured to size objects on heap in bytes - which has an inherent performance cost
- The mappings put in the cache are large enough that they trigger the max depth exception. Unless configured, the default is 1000. Which means that the value is an object graph with more than 1000 different objects in it.
Given that, I strongly suggest looking into the cache configuration and most likely stick with count sizing. Because the performance lost by traversing the graph will always be paid otherwise. |