• New Feature
  • Status: Closed
  • 3 Minor
  • Resolution: Duplicate
  • ehcache-core
  • alexsnaps
  • Reporter:
  • September 21, 2009
  • 0
  • Watchers: 0
  • July 27, 2012
  • September 07, 2011

Description

Hi. The idea is to improve usage of ehcache.xml file. Now, you have to enter number of elements that can be stored in the cache which is not a good parameter.

The size you can user in cache is very depended how you run your product. In production, for testing or for developing. Each execution can have various memory settings for the jvm. So, you have also to adjust the ehcache.xml for each configuration.

It is possible to avoid this, to have ehcache.xml maxElementsInMemory configured relativly to the current memory usage. Somthing like:

instead of this: having this:

When configuring cache, you should already know the maximum allowed jvm memory. So, the calculation of how many elements are 5% when you have around 512MB of memory and one element takes aproximatly 20KB should be not a problem.

This will made the ehcache.xml configuration much more flexible when running on different jvm configurations.

What do you think? Should be easy, not?

Or, maybe at least, you can provide a hook to make it possible to customize the cache configuration this way. As I looked, it is all hardcoded there. Sourceforge Ticket ID: 1990919 - Opened By: zip_dev - 11 Jun 2008 14:14 UTC

Comments

Fiona OShea 2010-03-11

Updating Target = Darwin to Terracotta Target = Darwin

Fiona OShea 2011-04-20

covered by EHC-440

Alexander Snaps 2011-09-07

EHC-440