When setting up collection caching using Ehcache 1.2.3 and Hibernate 3.2, how should I size my collection caches?
Does hibernate store one foreign key per collection element, or one collection per cache element?
Clearly, if a full collection is an element, the collection cache size should be about the number of entities I cache. If it's keys, the size should be the number of elements times the average collection size.
Of course, collection size may be unpredictable. It would also seem that Hibernate may end up caching part of a collection, but not all of it.
|