This Hibernate configuration ostensibly should control how many objects are cached in the first level cache. The reason is easy enough to understand, we don't want to run out of memory.

But something is confusing me. Every implementation I have seen including this website has an explicit flush and clear. No problem, but then what's point of the configuration property?

Note: I'm assuming here is that somehow Hibernate monitors the size of the cache and if the number of objects of a certain type grows to be larger than the cache size then synchronize the cache with the db. Don't know if that assumption is wrong ???

没有正确的解决方案

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top