title: How to determine the optimal value to use for Ehcache's maxElements settings?
body: <p>The currently released versions of Ehcache (2.4.1 is the latest) only support settings to control the maximum number of elements in the cache (maxElementsInMemory, and maxElementsOnDisk). How do you determine what the optimal value is for these two settings?</p>
  
  <p>For example, if I know my maximum heap size is set to 250m, how do I decide what the best value is for maxElementsInMemory?</p>