• New Feature
  • Status: Closed
  • 2 Major
  • Resolution: Duplicate
  • alexsnaps
  • Reporter:
  • September 21, 2009
  • 0
  • Watchers: 0
  • July 27, 2012
  • April 20, 2011

Description

I’d like to be able to configure the in-memory cache size in terms of an absolute memory footprint.

An issue that I have encountered in many cache implementations, including ehcache, is that it’s not always possible to accurately estimate the average size of an cached element.

For example:

If I want to cache elements of User-Generated-Content, there will be some days when the average content size is 4KB, and other days when the average is 200KB.

If I know that I have 400MB of RAM on my server available for caching, but to avoid the risk of running out of memory, I have to choose a cache size of 2048 elements, to cater the for larger content (2048 x 200KB = 400KB).

On a “small content” day, I would then end up only using 8MB of the 400MB of RAM that I have available.

What I’d really like to do is configure the cache as 400MB, rather than having to state the number of elements.

Sourceforge Ticket ID: 2644189 - Opened By: chbb77 - 27 Feb 2009 04:44 UTC

Comments

Fiona OShea 2010-03-11

Updating Target = Darwin to Terracotta Target = Darwin

Fiona OShea 2011-04-20

dup of EHC-440