org.apache.jackrabbit.core.state
Class CacheManager

This class manages the size of the caches used in Jackrabbit. The combined
size of all caches must be limited to avoid out of memory problems. The
available memory is dynamically distributed across the caches each second.
This class tries to calculates the best cache sizes by comparing the access
counts of each cache, and the used memory. The idea is, the more a cache is
accessed, the more memory it should get, while the cache should not shrink
too quickly. A minimum and maximum size per cache is defined as well. After
distributing the memory in this way, there might be some unused memory (if
one or more caches did not use some of the allocated memory). This unused
memory is distributed evenly across the full caches.